/* buyer-criteria.css — bc-field-stamp + per-field status checklist */

/* labels used in the BC summary card */
.bc-label{font-size:10px;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:3px;}
.bc-val{font-size:14px;font-weight:700;color:var(--primary-dark);margin-bottom:8px;}

/* ═══════════════════════════════════════════════════════════════════
   v111: BUYER CRITERIA FIELD STATUS — stamps + checklist
   Pattern mirrors the v106 NO FINANCIALS stamp in Financial Analysis.
   Fields wrapped in [data-bc-field] get an absolutely-positioned
   diagonal stamp when their status is 'no_preference' or 'not_available'.
   Stamp is hidden by default (display:none) and toggled by JS.
   ═══════════════════════════════════════════════════════════════════ */
[data-bc-field]{
  position: relative;  /* anchor for the absolutely-positioned stamp */
}
.bc-field-stamp{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 13px;
  opacity: 0.82;
  display: none;
}
.bc-field-stamp.no-pref{
  color: rgba(180, 83, 9, 0.95);
  border: 2.5px solid rgba(180, 83, 9, 0.58);
  background: rgba(254, 243, 199, 0.55);
}
.bc-field-stamp.not-avail{
  color: rgba(220, 38, 38, 0.95);
  border: 2.5px solid rgba(220, 38, 38, 0.58);
  background: rgba(254, 226, 226, 0.55);
}
[data-bc-field].bc-stamped > :not(.bc-field-stamp){
  opacity: 0.35;
  pointer-events: none;
}

/* ── Status checklist UI (at bottom of buyer criteria page) ── */
.bc-status-section{
  margin-top: 14px;
  border-top: 3px double #cbd5e1;
  background: linear-gradient(180deg,#fafbff,#f8fafc);
  border-radius: 0 0 8px 8px;
}
.bc-status-toggle{
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #1e40af;
  text-align: left;
}
.bc-status-toggle:hover{ background: rgba(30,64,175,0.04); }
.bc-status-counts{
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
}
.bc-count-pill{
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bc-count-pill.collected{ background: #dcfce7; color: #15803d; }
.bc-count-pill.no-pref  { background: #fef3c7; color: #92400e; }
.bc-count-pill.not-avail{ background: #fee2e2; color: #991b1b; }
.bc-status-body{
  padding: 14px 22px 20px;
  display: none;
}
.bc-status-body.open{ display: block; }
.bc-status-intro{
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #1e3a8a;
  margin-bottom: 12px;
  line-height: 1.6;
}
.bc-status-bulk{
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.bc-status-bulk-label{
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.bc-status-bulk button{
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.bc-status-bulk button:hover{ background: #f1f5f9; }
.bc-status-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 6px 2px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}
.bc-status-row:last-child{ border-bottom: none; }
.bc-status-row-name{ font-size: 12px; color: #0f172a; font-weight: 500; }
.bc-status-selector{
  display: flex;
  gap: 0;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
}
.bc-status-selector button{
  background: #fff;
  color: #475569;
  border: none;
  padding: 4px 9px;
  cursor: pointer;
  border-right: 1px solid #e2e8f0;
  min-width: 76px;
  white-space: nowrap;
}
.bc-status-selector button:last-child{ border-right: none; }
.bc-status-selector button.active.collected{ background: #15803d; color: #fff; }
.bc-status-selector button.active.no-pref  { background: #b45309; color: #fff; }
.bc-status-selector button.active.not-avail{ background: #991b1b; color: #fff; }
.bc-status-subgroup{ margin-bottom: 14px; }
.bc-status-subhdr{
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════════════
   v374.9 — Buyer Criteria redesign (handoff at /Users/rickyreyes/
   Downloads/buyercriteria.jsx + styles (2).css).
   Institutional list + asset-aware detail view. All selectors prefixed
   with bc- / ast- / req- so they don't collide with legacy rules. The
   shared .section / .field-grid / .field / .lbl / .val vocabulary
   already exists from v366 + v373 (Property Details) and is reused
   here as the structural scaffold.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Page toolbar ──────────────────────────────────────────────── */
.bc-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
}
.bc-page-toolbar .left { display: flex; align-items: center; gap: 10px; }
.bc-page-toolbar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-page-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bc-page-title .muted {
  font-weight: 500;
  font-size: 12px;
  color: var(--text3, #64748b);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Buttons (bc-btn variants) ─────────────────────────────────── */
.bc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #0f172a);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.bc-btn:hover { background: var(--surface2, #f8fafc); border-color: #cbd5e1; }
.bc-btn.primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.bc-btn.primary:hover { background: #1e40af; border-color: #1e40af; }
.bc-btn.ghost { background: transparent; border-color: transparent; color: var(--text2, #475569); }
.bc-btn.ghost:hover { background: var(--surface2, #f8fafc); color: var(--text, #0f172a); }
.bc-btn.sm { padding: 3px 8px; font-size: 11.5px; }
.bc-btn.sm svg { width: 12px; height: 12px; }
.bc-btn svg { width: 13px; height: 13px; }

/* ── Search box ────────────────────────────────────────────────── */
.bc-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  min-width: 320px;
  flex: 0 1 480px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.bc-search:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bc-search svg { color: var(--text3, #64748b); flex-shrink: 0; }
.bc-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text, #0f172a);
  outline: none;
  padding: 1px 0;
}
.bc-search input::placeholder { color: var(--text3, #94a3b8); }

/* ── VIP toggle ────────────────────────────────────────────────── */
.bc-vip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  background: var(--surface, #fff);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #475569);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.bc-vip svg { color: var(--text3, #94a3b8); }
.bc-vip:hover { background: var(--surface2, #f8fafc); }
.bc-vip.on { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.bc-vip.on svg { color: #d97706; }

/* ── Filter badge / select sm ──────────────────────────────────── */
.bc-select-sm {
  padding: 5px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #0f172a);
  cursor: pointer;
  font-family: inherit;
}

/* ── Section wrapper (used inside BC tab) ──────────────────────── */
.bc-section {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  margin: 14px 20px;
  overflow: hidden;
}
.bc-section + .bc-section { margin-top: 14px; }
.bc-section-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface2, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text, #0f172a);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bc-section-hd svg { color: #2563eb; flex-shrink: 0; }
.bc-section-hd .sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text3, #94a3b8);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.bc-section-hd .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bc-section-bd { padding: 14px 16px; }
.bc-section-bd.flush { padding: 0; }

/* ── BC table (dt-style) ───────────────────────────────────────── */
.bc-table-wrap { overflow-x: auto; }
.bc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  font-family: inherit;
  background: var(--surface, #fff);
}
.bc-table thead th {
  background: var(--surface2, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  color: var(--text2, #475569);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.bc-table thead th.num { text-align: right; }
.bc-table thead th.ta-right { text-align: right; }
.bc-table thead th:hover { background: #eff6ff; color: #1d4ed8; }
.bc-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 12px;
  color: var(--text, #0f172a);
  vertical-align: middle;
}
.bc-table tbody td.num { text-align: right; font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace); }
.bc-table tbody td.mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace); }
.bc-table tbody td.strong { font-weight: 700; }
.bc-table tbody td.fg-2 { color: var(--text2, #475569); }
.bc-table tbody td.ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-table tbody td.ta-right { text-align: right; }
.bc-table tbody tr.bc-row { cursor: pointer; transition: background 0.1s; }
.bc-table tbody tr.bc-row:hover td { background: var(--surface2, #f8fafc); }
.bc-table tbody tr.bc-row.vip td { background: #fffbeb; }
.bc-table tbody tr.bc-row.vip:hover td { background: #fef9c3; }
.bc-table tbody .placeholder { color: var(--text3, #cbd5e1); font-style: italic; }

/* Lead dot — green/amber/gray indicator next to name */
.lead-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.lead-dot.dot-green { background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18); }
.lead-dot.dot-amber { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18); }
.lead-dot.dot-gray  { background: #94a3b8; box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18); }

/* Star button (VIP toggle in row) */
.star-btn {
  border: 0;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1;
  transition: color 0.12s, transform 0.12s;
}
.star-btn:hover { color: #fbbf24; transform: scale(1.1); }
.star-btn.on { color: #f5c400; }
.star-btn.on:hover { color: #d97706; }

/* Asset chips (semantic palette per asset type) */
.ast-chip-row { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ast-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
}
.ast-mf      { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.ast-retail  { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.ast-ind     { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ast-mix     { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.ast-auto    { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.ast-spec    { background: #eef2ff; color: #312e81; border-color: #c7d2fe; }
.ast-office  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.ast-land    { background: #ecfccb; color: #3f6212; border-color: #bef264; }
.ast-hosp    { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.ast-nc      { background: #f1f5f9; color: #475569; border-color: #cbd5e1; font-style: italic; }

.chip-x {
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  padding: 1px 4px;
  margin-left: 2px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
}
.chip-x:hover { background: rgba(0, 0, 0, 0.12); }

/* Row-actions (inline action buttons in last column) */
.bc-table .row-actions { display: inline-flex; gap: 2px; }
.bc-table .lbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 0;
  background: none;
  color: var(--text2, #475569);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.bc-table .lbtn:hover { background: var(--surface2, #f1f5f9); color: var(--text, #0f172a); }
.bc-table .lbtn svg { width: 11px; height: 11px; }

/* Empty row placeholder */
.bc-table .bc-empty {
  text-align: center;
  padding: 40px 20px !important;
  color: var(--text3, #64748b);
  font-style: italic;
}

/* ── BC Detail view (linked from row click) ────────────────────── */
.bc-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
}
.bc-detail-toolbar .left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-detail-toolbar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-detail-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  letter-spacing: -0.01em;
}

/* Field grid (reused from Property Details vocab but BC-prefixed
   so we don't fight pds-field rules). 4-col grid for Contact card. */
.bc-field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.bc-field-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bc-field-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.bc-field {
  padding: 10px 14px;
  border-right: 1px solid var(--border, #e2e8f0);
  border-bottom: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
  position: relative;
}
.bc-field-grid > .bc-field:nth-child(3n) { border-right: none; }
.bc-field-grid.cols-2 > .bc-field:nth-child(2n) { border-right: none; }
.bc-field-grid.cols-4 > .bc-field:nth-child(4n) { border-right: none; }
.bc-field-grid > .bc-field:last-child { border-right: none; }
.bc-field-grid > .bc-field:nth-last-child(-n+3) { border-bottom: none; }
.bc-field-grid.cols-2 > .bc-field:nth-last-child(-n+2) { border-bottom: none; }
.bc-field-grid.cols-4 > .bc-field:nth-last-child(-n+4) { border-bottom: none; }
.bc-field .lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3, #94a3b8);
}
.bc-field .lbl .hint {
  font-size: 9.5px;
  color: var(--text3, #94a3b8);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 4px;
}
.bc-field .val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #0f172a);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bc-field .val.mono,
.bc-field .val .mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace); font-weight: 600; }
.bc-field .val.strong { font-weight: 700; }
.bc-field .val .pre { color: var(--text3, #94a3b8); font-size: 12px; }
.bc-field .val .unit { color: var(--text3, #94a3b8); font-size: 11px; margin-left: 4px; }
.bc-field.two-wide { grid-column: span 2; }

/* Inputs inside the BC detail field grid */
.bc-field .bc-input,
.bc-field input.bc-input,
.bc-field select.bc-input,
.bc-field textarea.bc-input {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 7px;
  margin: -2px -6px;
  color: var(--text, #0f172a);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.12s, background 0.12s;
}
.bc-field input.bc-input.mono,
.bc-field select.bc-input.mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace); font-weight: 600; }
.bc-field input.bc-input:focus,
.bc-field select.bc-input:focus,
.bc-field textarea.bc-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.bc-field input.bc-input:hover:not(:focus),
.bc-field select.bc-input:hover:not(:focus) { border-color: var(--border, #e2e8f0); }
.bc-field select.bc-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  padding-right: 22px;
}
.bc-field .price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bc-field .price-range input { min-width: 0; flex: 1; }
.bc-field .ck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text, #0f172a);
  cursor: pointer;
}
.bc-field .ck input[type="checkbox"] { accent-color: #2563eb; }

/* Subheadings inside section bodies */
.bc-subhd {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2, #475569);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 8px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bc-subhd.small { font-size: 10.5px; }
.bc-subhd .hint {
  font-size: 10px;
  color: var(--text3, #94a3b8);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 4px;
}
.bc-subhd-spaced {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.bc-subhd-top { border-top: 1px solid var(--border, #e2e8f0); }

/* Textarea */
.bc-ta {
  display: block;
  width: 100%;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text, #0f172a);
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.bc-ta:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

/* Asset chip input row (rendered chips + remove buttons) */
.bc-asset-chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  min-height: 42px;
  margin-top: 6px;
}

/* Search input for asset types */
.bc-asset-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  margin-top: 8px;
}
.bc-asset-search svg { color: var(--text3, #94a3b8); }
.bc-asset-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

/* Category / Subtype grid */
.bc-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.bc-cat-col {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 10px;
}
.bc-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow: auto;
}
.bc-cat-item {
  text-align: left;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: var(--text, #0f172a);
  border-radius: 4px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.1s;
}
.bc-cat-item:hover { background: var(--surface2, #f8fafc); }
.bc-cat-item.is-add {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}
.bc-cat-item.is-add:hover { background: #bfdbfe; }
.bc-cat-item.active { background: #2563eb; color: #fff; font-weight: 600; }

/* Geographic 3-col grid */
.bc-geo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
.bc-geo-col { display: flex; flex-direction: column; gap: 4px; }
.bc-state-input,
.bc-county-input,
.bc-city-input {
  min-height: 36px;
  padding: 6px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.bc-state-input.empty,
.bc-county-input.empty,
.bc-city-input.empty {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
  font-style: italic;
  font-size: 11.5px;
}
.bc-input-text {
  width: 100%;
  padding: 6px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text, #0f172a);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.bc-input-text.mt-6 { margin-top: 6px; }
.bc-input-text:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.bc-hint {
  font-size: 10.5px;
  color: var(--text3, #94a3b8);
  margin-top: 6px;
  line-height: 1.4;
}

/* Quick-add buttons (regions) */
.bc-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.bc-quick .qa {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  color: var(--text2, #475569);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.bc-quick .qa:hover { background: var(--surface2, #f8fafc); border-color: #cbd5e1; color: var(--text, #0f172a); }
.bc-quick .qa.qa-clr { color: #b91c1c; border-color: #fecaca; }
.bc-quick .qa.qa-clr:hover { background: #fee2e2; }

/* Asset-aware Requirements section header (chip + label) */
.bc-req-section .bc-section-hd {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bc-req-section .req-hd {
  font-weight: 700;
  font-size: 12px;
  color: #1e40af;
  text-transform: none;
  letter-spacing: 0;
}

/* Notes-grid (2-col textareas at bottom) */
.bc-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Pill (status indicators in detail toolbar) */
.bc-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bc-pill.stage-offer    { background: #dcfce7; color: #166534; }
.bc-pill.stage-prospect { background: #dbeafe; color: #1e40af; }
.bc-pill.stage-hot      { background: #fee2e2; color: #991b1b; }

/* Empty state (when no asset types selected) */
.bc-empty-state {
  padding: 50px 20px;
  text-align: center;
  color: var(--text3, #64748b);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bc-empty-state svg { color: #cbd5e1; }
.bc-empty-title { font-size: 14px; font-weight: 700; color: var(--text, #0f172a); }
.bc-empty-sub { font-size: 12px; color: var(--text2, #475569); max-width: 460px; line-height: 1.5; }

/* AI Auto-Fill Notes table reuses .bc-table styling */

/* ─────────────────────────────────────────────────────────────
   v374.10 — BC detail-view overlay.
   The detail view body (bcOpenExpanded) is ~2000 lines of inline
   HTML using legacy .info-box / .info-box-title / .bc-label / .bc-val
   chrome. Rather than rewrite every line, the outer wrapper now
   carries the .bc-detail class and these rules retarget the legacy
   classes inside that wrapper to the new institutional design.
   ───────────────────────────────────────────────────────────── */
.bc-detail {
  font-family: inherit;
  color: var(--text, #0f172a);
}

.bc-detail .info-box {
  background: var(--surface, #fff) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 8px !important;
  margin: 0 0 14px 0 !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
}
.bc-detail .info-box-title {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 14px !important;
  background: var(--surface2, #f8fafc) !important;
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--text, #0f172a) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 0 !important;
  margin: 0 !important;
}
.bc-detail .info-box > *:not(.info-box-title) {
  padding: 14px 16px !important;
}
.bc-detail .info-box > div:not(.info-box-title) {
  padding: 14px 16px !important;
}

.bc-detail .bc-label {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--text3, #94a3b8) !important;
  margin-bottom: 4px !important;
}
.bc-detail .bc-val {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text, #0f172a) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.3 !important;
  margin-bottom: 0 !important;
}

/* Native form inputs inside BC detail get a uniform institutional look */
.bc-detail input.form-input,
.bc-detail select.form-input,
.bc-detail textarea.form-input,
.bc-detail input.num-input {
  border: 1px solid var(--border, #e2e8f0) !important;
  background: var(--surface, #fff) !important;
  border-radius: 5px !important;
  padding: 6px 10px !important;
  font-size: 12.5px !important;
  font-family: inherit !important;
  color: var(--text, #0f172a) !important;
  transition: border-color 0.12s, box-shadow 0.12s !important;
}
.bc-detail input.form-input:focus,
.bc-detail select.form-input:focus,
.bc-detail textarea.form-input:focus,
.bc-detail input.num-input:focus {
  outline: none !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10) !important;
}
.bc-detail textarea.form-input { line-height: 1.5; resize: vertical; }

/* Asset pills inside the bc-detail page — convert the legacy
   `background:#1a3a6e;color:#fff;border-radius:99px` pills (rendered
   inline-styled in bcOpenExpanded's selected-assets row) to chip
   semantic styling. Since they carry hard-coded inline styles, we
   target the specific element shape. */
.bc-detail #bcf_asset_pills {
  background: var(--surface2, #f8fafc) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  min-height: 40px !important;
}
.bc-detail #bcf_asset_pills > span {
  /* Inline styles still apply but we override the visual chrome */
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  border-radius: 4px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* State pills (yellow amber chip group) */
.bc-detail #bcf_state_pills,
.bc-detail #bcf_county_pills,
.bc-detail #bcf_city_pills {
  background: var(--surface2, #f8fafc) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  min-height: 40px !important;
}

/* Save/AI buttons in section headers — common .save-btn rules */
.bc-detail .save-btn {
  background: var(--surface, #fff) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  color: var(--text, #0f172a) !important;
  border-radius: 5px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s !important;
}
.bc-detail .save-btn:hover {
  background: var(--surface2, #f8fafc) !important;
  border-color: #cbd5e1 !important;
}

/* Sticky header chrome that's set inline via the new toolbar */
.bc-detail > .bc-detail-toolbar {
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

/* Grids inside info-box bodies should not get the !important padding
   bump because they're already inside the section body. */
.bc-detail .info-box > div[style*="grid"],
.bc-detail .info-box > div[style*="flex"] {
  /* Let the inline display rules win; only force padding. */
}

/* Inner section labels with the bc-label class */
.bc-detail .bc-label[style*="margin-bottom"] {
  margin-bottom: 6px !important;
}

/* AI Review Panel (yellow callout above contact card) — tone it down
   to a softer amber so it doesn't fight the institutional palette. */
.bc-detail #bcReviewPanel {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
  margin-bottom: 14px !important;
}

/* ─────────────────────────────────────────────────────────────
   v374.11 — BC detail layout refinements.
   1. Center meta-strip in the sticky toolbar (4 KPI cells).
   2. Add-Asset-Type toggle pattern: chip row stays visible, picker
      hides behind a primary button in the section header.
   3. Geographic + Financial sections side-by-side (.bc-two-col).
   ───────────────────────────────────────────────────────────── */

/* Center meta-strip (between .left and .right inside .bc-detail-toolbar) */
.bc-detail-toolbar .bc-toolbar-meta {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 12px;
  justify-content: flex-end;
}
.bc-detail-toolbar .meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 14px;
  border-left: 1px solid var(--border, #e2e8f0);
  min-width: 88px;
}
.bc-detail-toolbar .meta-cell:first-child { border-left: 0; padding-left: 0; }
.bc-detail-toolbar .meta-lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3, #94a3b8);
  white-space: nowrap;
}
.bc-detail-toolbar .meta-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.15;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.bc-detail-toolbar .meta-val.primary { color: #1d4ed8; }
.bc-detail-toolbar .meta-val.strong  { font-weight: 800; }
.bc-detail-toolbar .meta-suf {
  font-size: 10px;
  color: var(--text3, #94a3b8);
  font-weight: 500;
}
.bc-detail-toolbar .meta-val .placeholder {
  color: var(--text3, #cbd5e1);
  font-style: italic;
  font-weight: 500;
}

/* Vertical divider for the toolbar right side (between More and Save) */
.bc-toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border, #e2e8f0);
  margin: 0 4px;
  display: inline-block;
}

/* Larger button variant */
.bc-btn.lg,
.bc-btn.primary.lg {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Add Asset Type primary button (small shadow so it lifts off the
   surface-2 section-header strip) */
.add-asset-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
}
.add-asset-btn svg { stroke-width: 2.25; }

/* Compact asset chip row (used when picker is collapsed) */
.bc-detail #bcf_asset_pills.compact,
.asset-chip-input.compact {
  min-height: 32px !important;
  padding: 6px 10px !important;
  margin: 6px 0 0 0 !important;
}

/* Collapsible picker callout (search + Category/Subtype panels) */
.asset-picker-pop {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
}
.asset-picker-pop .bc-cat-grid,
.asset-picker-pop > div[style*="grid-template-columns"] { margin-top: 10px; }

/* Generic collapse helper — kept here (not in design-system.css) since
   it's only used inside .bc-detail for now. */
.bc-collapsed { display: none !important; }

/* Geographic Coverage + Financial Parameters side-by-side row */
.bc-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.bc-two-col > .info-box,
.bc-two-col > .section {
  margin-bottom: 0 !important;
  min-width: 0; /* prevent overflow inside grid track */
}

/* Shorter quick-add region buttons (fit narrower half-width column) */
.bc-detail .qa-mini {
  padding: 3px 8px !important;
  font-size: 10px !important;
  min-width: 0 !important;
}

/* ─────────────────────────────────────────────────────────────
   v374.12 — Chip combobox (.cc-*).
   Unified pattern that puts chips and the text input into a single
   focused field with a dropdown of suggestions. Replaces the
   chip-row-above-input pattern used for Asset Types and Geo
   (States / Counties / Cities) selectors.
   - Click anywhere on .cc-field → focuses the inline input
   - Type to filter suggestions
   - Enter → commit the highlighted suggestion (or free-text)
   - Backspace on empty input → removes last chip
   - Click outside → closes dropdown
   ───────────────────────────────────────────────────────────── */
.cc-root { position: relative; }
.cc-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  cursor: text;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cc-field:hover { border-color: #93c5fd; }
.cc-root.is-open .cc-field {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cc-input {
  flex: 1;
  min-width: 100px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text, #0f172a);
  padding: 2px 0;
}
.cc-input::placeholder { color: var(--text3, #94a3b8); }

.cc-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3, #94a3b8);
  pointer-events: none;
  width: 12px;
  height: 12px;
}
.cc-root.is-open .cc-caret { color: #2563eb; }

.cc-pop {
  /* v374.28: position:fixed (was absolute) so the dropdown escapes any
     ancestor overflow:hidden / clip-path. JS computes top/left via
     getBoundingClientRect on every open + on scroll/resize (see
     _bcCcPosPop in index.html). Same fix the top-nav typeahead got
     in v374.20.1. */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  min-width: 240px;
  max-width: min(560px, calc(100vw - 40px));
}
.cc-asset-pop { max-height: 340px; }

.cc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text, #0f172a);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s ease, color 0.1s ease;
}
.cc-row:hover { background: #dbeafe; color: #1e40af; }
.cc-row.is-highlighted { background: #dbeafe; color: #1e40af; }
.cc-row-new { color: #1d4ed8; font-weight: 600; }
.cc-row-new b { font-weight: 700; }
.cc-row-new .cc-hint {
  color: var(--text3, #94a3b8);
  font-size: 11px;
  margin-left: auto;
  font-weight: 500;
}
.cc-row-asset { padding: 4px 8px; }
.cc-row-asset .ast-chip { font-size: 11px; }
.cc-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text3, #94a3b8);
  font-style: italic;
}

/* Existing pill-row containers inside .bc-detail get the .cc-field
   chrome when they're inside a .cc-root wrapper (so chips and the
   input read as one focused control). */
.bc-detail .cc-root .cc-field > input {
  border: 0 !important;
  outline: none;
  background: transparent !important;
  font-size: 12.5px;
  padding: 2px 0 !important;
  margin: 0 !important;
  flex: 1;
  min-width: 100px;
}
.bc-detail .cc-root .cc-field > input:focus { border: 0 !important; box-shadow: none !important; }
