/* Lead Desk / Lead Pool + agent lead marketplace — Stitch "Light & Gold".
   Re-skins the lp-* / sh-* components on --sh-* tokens (theme.css). Scoped to #sec-leadmodule,
   the lead drawer and the agent marketplace, so other modules are untouched. */

#sec-leadmodule, #sec-leadmodule .lp-panel { font-family: var(--sh-font); color: var(--sh-on-surface); }
#sec-leadmodule .material-symbols-outlined { font-size: 18px; line-height: 1; vertical-align: middle; flex-shrink: 0; }
#sec-leadmodule .lp-panel .sec-hdr { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
#sec-leadmodule .lp-panel .sec-hdr > div:first-child { min-width: 0; }

/* ── Inline-colour remaps (legacy indigo/slate hexes written in markup + JS templates) ── */
#sec-leadmodule [style*="#64748B"], #sec-leadmodule [style*="#6B7280"], #sec-leadmodule [style*="#475569"], #sec-leadmodule [style*="#374151"] { color: var(--sh-on-surface-variant) !important; }
#sec-leadmodule [style*="#1e293b"], #sec-leadmodule [style*="#111827"], #sec-leadmodule [style*="color:#111;"] { color: var(--sh-on-surface) !important; }
#sec-leadmodule [style*="#9CA3AF"] { color: var(--sh-outline) !important; }
#sec-leadmodule [style*="#4F46E5"], #sec-leadmodule [style*="#6366F1"], #sec-leadmodule [style*="#0891B2"] { color: var(--sh-primary) !important; }
#sec-leadmodule [style*="background:#EEF2FF"], #sec-leadmodule [style*="background:#F9FAFB"], #sec-leadmodule [style*="background:#F8FAFC"], #sec-leadmodule [style*="background:#F3F4F6"] { background: var(--sh-surface-low) !important; }
#sec-leadmodule [style*="rgba(79,70,229,.1)"], #sec-leadmodule [style*="rgba(8,145,178,.1)"], #sec-leadmodule [style*="rgba(99,102,241,.1)"] { background: var(--sh-surface-high) !important; color: var(--sh-primary) !important; }
#sec-leadmodule [style*="border:1px solid #E5E7EB"] { border-color: var(--sh-surface-container) !important; }
#sec-leadmodule [style*="border-left:4px solid #F59E0B"] { border-left-color: var(--sh-primary-container) !important; }
#sec-leadmodule [style*="color:#B91C1C"] { color: var(--sh-error) !important; }

/* ── Cards ── */
#sec-leadmodule .card { padding: 20px; margin-bottom: 16px; }
#sec-leadmodule .sh-form-card { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
#sec-leadmodule .fl { font-size: 11px; font-weight: 700; color: var(--sh-on-surface-variant); text-transform: uppercase; letter-spacing: .04em; }
#sec-leadmodule .fg { margin-bottom: 0; }
#sec-leadmodule .sh-sub { color: var(--sh-on-surface-variant); }
#sec-leadmodule .empty { color: var(--sh-on-surface-variant); background: var(--sh-surface-low); border-radius: 12px; padding: 32px 16px; text-align: center; font-size: 13px; }

/* ── KPI tiles (pool stats / offers / analytics) ── */
#sec-leadmodule .lp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
#sec-leadmodule .lp-stat, #sec-leadmodule .sh-okpi, #sec-leadmodule .sh-kpi-card {
  position: relative; overflow: hidden; background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; padding: 16px;
}
#sec-leadmodule .lp-stat::before, #sec-leadmodule .sh-okpi::before, #sec-leadmodule .sh-kpi-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sh-surface-high); }
#sec-leadmodule .lp-stat:first-child::before, #sec-leadmodule .sh-okpi:first-child::before, #sec-leadmodule .sh-kpi-card:first-child::before { background: var(--sh-primary-container); }
#sec-leadmodule .lp-stat-val, #sec-leadmodule .sh-okpi-val, #sec-leadmodule .sh-kval { font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--sh-on-surface); }
#sec-leadmodule .lp-stat-lbl, #sec-leadmodule .sh-okpi-lbl, #sec-leadmodule .sh-klbl { font-size: 11px; font-weight: 700; color: var(--sh-on-surface-variant); text-transform: uppercase; letter-spacing: .06em; opacity: 1; margin-top: 4px; }
#sec-leadmodule .sh-okpi-g { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-okpi-g::before { background: var(--sh-ok); }
#sec-leadmodule .sh-okpi-a { background: #fff4de; color: var(--sh-secondary); }
#sec-leadmodule .sh-okpi-a::before { background: var(--sh-primary-container); }
#sec-leadmodule .sh-kico { border-radius: 8px; background: var(--sh-surface-low); color: var(--sh-primary); }
#sec-leadmodule .sh-kico-v, #sec-leadmodule .sh-kico-c, #sec-leadmodule .sh-kico-b, #sec-leadmodule .sh-kico-a { background: var(--sh-surface-low); color: var(--sh-primary); }
#sec-leadmodule .sh-kico-g { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-btrack { background: var(--sh-surface-container); }

/* ── Filter panel (marketplace filter module) ── */
#sec-leadmodule .sh-toolbar { background: var(--sh-surface-lowest); box-shadow: var(--sh-shadow); border-radius: 12px; padding: 14px 16px; gap: 12px; margin-bottom: 16px; }
#sec-leadmodule .sh-sel, #sec-leadmodule .sh-srch-in {
  border: none; background-color: var(--sh-surface-low); color: var(--sh-on-surface); font-family: var(--sh-font); font-size: 12px; font-weight: 600; border-radius: 8px; padding: 9px 28px 9px 12px;
}
#sec-leadmodule .sh-sel-sm { padding: 7px 24px 7px 10px; font-size: 11px; }
#sec-leadmodule .sh-sel:focus, #sec-leadmodule .sh-srch-in:focus { background-color: var(--sh-surface-lowest); box-shadow: 0 0 0 2px var(--sh-primary-container); border: none; outline: none; }
#sec-leadmodule .sh-biz-sel { background-color: #fff3df; color: var(--sh-on-primary-container); font-weight: 700; }
#sec-leadmodule .sh-biz-sel option { color: var(--sh-on-surface); background: var(--sh-surface-lowest); }
#sec-leadmodule .sh-srch-in { border-radius: 8px 0 0 8px; padding: 9px 12px; min-width: 200px; }
#sec-leadmodule .sh-srch-btn { background: var(--sh-surface-container); border: none; border-radius: 0 8px 8px 0; color: var(--sh-on-surface-variant); padding: 9px 12px; cursor: pointer; }
#sec-leadmodule .sh-srch-btn:hover { background: var(--sh-surface-high); }
#sec-leadmodule .sh-pill { border: none; background: var(--sh-surface-low); color: var(--sh-on-surface-variant); font-family: var(--sh-font); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 6px 12px; }
#sec-leadmodule .sh-pill:hover { background: var(--sh-surface-container); color: var(--sh-on-surface); }
#sec-leadmodule .sh-pill:has(input:checked) { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-leadmodule .sh-chip { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); font-weight: 700; border-radius: 999px; padding: 4px 12px; }
#sec-leadmodule .sh-chip-warn { background: #fff4de; color: var(--sh-secondary); }
#sec-leadmodule #lpSelectedCount { background: var(--sh-primary-container) !important; color: var(--sh-on-primary-container) !important; }
#sec-leadmodule .sh-mbtn { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--sh-surface-low); color: var(--sh-on-surface); border-radius: 8px; padding: 8px 14px; font-family: var(--sh-font); font-size: 12px; font-weight: 600; cursor: pointer; }
#sec-leadmodule .sh-mbtn:hover { background: var(--sh-surface-container); color: var(--sh-on-surface); }
#sec-leadmodule .sh-mbtn-a { background: var(--sh-primary-container); color: var(--sh-on-primary-container); font-weight: 700; box-shadow: 0 1px 3px rgba(133, 83, 0, .2); }
#sec-leadmodule .sh-mbtn-a:hover { background: var(--sh-primary); color: var(--sh-on-primary); }
#sec-leadmodule .lp-view-toggle { border: none; background: var(--sh-surface-low); border-radius: 8px; padding: 3px; gap: 2px; }
#sec-leadmodule .lp-view-btn { border-radius: 6px; color: var(--sh-on-surface-variant); font-family: var(--sh-font); }
#sec-leadmodule .lp-view-btn.active { background: var(--sh-surface-lowest); color: var(--sh-on-surface); box-shadow: var(--sh-shadow); }
#sec-leadmodule .sh-qbar { background: var(--sh-surface-low); border: none; border-radius: 8px; color: var(--sh-on-surface-variant); }
#sec-leadmodule .sh-qs { color: var(--sh-on-surface-variant); font-weight: 600; }
#sec-leadmodule .sh-qs-warn { color: var(--sh-secondary); }
#sec-leadmodule .sh-flash { border: none; border-radius: 8px; font-weight: 600; }
#sec-leadmodule .sh-fok { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-ferr { background: var(--sh-error-container); color: var(--sh-error); }
#sec-leadmodule .sh-fwarn { background: #fff4de; color: var(--sh-secondary); }

/* ── Lead cards (pool inventory) ── */
#sec-leadmodule .lp-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
#sec-leadmodule .lp-card { position: relative; overflow: hidden; background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; padding: 16px 16px 14px 20px; }
#sec-leadmodule .lp-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sh-surface-high); }
#sec-leadmodule .lp-card:has(.lp-score-hot)::before { background: var(--sh-primary-container); }
#sec-leadmodule .lp-card:has(.lp-score-warm)::before { background: #ffddb8; }
#sec-leadmodule .lp-card:hover { box-shadow: var(--sh-shadow-lg); border: none; }
#sec-leadmodule .lp-card.lp-card-sel { background: #fff8ee; box-shadow: 0 0 0 2px var(--sh-primary-container) !important; border: none !important; }
#sec-leadmodule .lp-card-title { font-size: 15px; font-weight: 700; color: var(--sh-on-surface); }
#sec-leadmodule .lp-card-sub { color: var(--sh-on-surface-variant); }
#sec-leadmodule .lp-card-contact { background: var(--sh-surface-low); color: var(--sh-on-surface-variant); border-radius: 8px; }
#sec-leadmodule .lp-card-loc { color: var(--sh-on-surface-variant); }
#sec-leadmodule .lp-card-foot { border-top: 1px solid var(--sh-surface-container); }
#sec-leadmodule .lp-score { border-width: 0; font-weight: 800; }
#sec-leadmodule .lp-score-hot { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-leadmodule .lp-score-warm { background: #fff4de; color: var(--sh-secondary); }
#sec-leadmodule .lp-score-cold { background: var(--sh-error-container); color: var(--sh-error); }
#sec-leadmodule .lp-score-none { background: var(--sh-surface-container); color: var(--sh-outline); }
#sec-leadmodule .lp-card-check { accent-color: var(--sh-primary-container); }
#sec-leadmodule .lp-list-shell, #sec-leadmodule .sh-tbl-shell { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; overflow: hidden; }

/* ── Tables ── */
#sec-leadmodule .sh-tbl thead { background: var(--sh-surface-low); border-bottom: none; }
#sec-leadmodule .sh-tbl th, #sec-leadmodule table.dt th { color: var(--sh-on-surface-variant); font-size: 11px; font-weight: 700; letter-spacing: .06em; background: var(--sh-surface-low); }
#sec-leadmodule .sh-tbl td { color: var(--sh-on-surface); border-bottom: 1px solid var(--sh-surface-container); }
#sec-leadmodule .sh-tbl tbody tr:hover td { background: var(--sh-surface); }
#sec-leadmodule .sh-row-sel td { background: #fff7e8 !important; }
#sec-leadmodule .sh-score { border-radius: 999px; font-weight: 800; }
#sec-leadmodule .sh-sg { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-sa { background: #fff4de; color: var(--sh-secondary); }
#sec-leadmodule .sh-sr { background: var(--sh-error-container); color: var(--sh-error); }
#sec-leadmodule .sh-dot-on { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-spt { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-leadmodule .sh-badge { border-radius: 999px; font-weight: 700; }
#sec-leadmodule .sh-badge-gray { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); }
#sec-leadmodule .sh-badge-green { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-leadmodule .sh-badge-blue { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-leadmodule .sh-badge-amber { background: #fff4de; color: var(--sh-secondary); }
#sec-leadmodule .sh-ibtn { border: none; background: var(--sh-surface-low); border-radius: 8px; color: var(--sh-on-surface-variant); }
#sec-leadmodule .sh-ibtn:hover { background: var(--sh-surface-container); }
#sec-leadmodule .sh-ibtn-e:hover { color: var(--sh-primary); }
#sec-leadmodule .sh-ibtn-d:hover { background: var(--sh-error-container); color: var(--sh-error); border: none; }
#sec-leadmodule .sh-pgi { color: var(--sh-on-surface-variant); font-weight: 600; }

/* ── Import & route / push to market ── */
#sec-leadmodule .sh-dz { border: 2px dashed var(--sh-outline-variant); background: var(--sh-surface-low); border-radius: 12px; }
#sec-leadmodule .sh-dz:hover { border-color: var(--sh-primary-container); background: #fff8ee; }
#sec-leadmodule .sh-dz-ico { background: rgba(245, 158, 11, .16); color: var(--sh-primary); border-radius: 12px; }
#sec-leadmodule .sh-push-mode { background: var(--sh-surface-low); border: none; border-radius: 12px; padding: 8px; gap: 6px; }
#sec-leadmodule .sh-scroll-list { border: none; background: var(--sh-surface-low); border-radius: 8px; padding: 4px; }
#sec-leadmodule .sh-crow { border-radius: 8px; }
#sec-leadmodule .sh-crow:hover { background: var(--sh-surface-container); }
#sec-leadmodule .sh-crow-feat { background: #fff3df; border: none; color: var(--sh-on-primary-container); }
#sec-leadmodule .sh-sector-sum { background: #fff3df; border: none; border-radius: 8px; color: var(--sh-on-primary-container); }
#sec-leadmodule .sh-btn-push { background: var(--sh-primary-container); color: var(--sh-on-primary-container); border: none; border-radius: 8px; font-family: var(--sh-font); font-weight: 700; box-shadow: 0 1px 4px rgba(133, 83, 0, .2); }
#sec-leadmodule .sh-btn-push:hover:not(:disabled) { background: var(--sh-primary); color: var(--sh-on-primary); }
#sec-leadmodule .sh-push-grid { gap: 16px; }

/* ── AI sourcing / radar ── */
#sec-leadmodule .sh-agent-layout { gap: 24px; }
#sec-leadmodule .sh-agent-form-card { border-top: 3px solid var(--sh-primary-container); }
#sec-leadmodule .sh-agent-results { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; }
#sec-leadmodule #agResultsPlaceholder { background: var(--sh-surface-low); box-shadow: none; border: 2px dashed var(--sh-outline-variant); }
#sec-leadmodule .sh-agent-head { border-bottom-color: var(--sh-surface-container); }
#sec-leadmodule .sh-chk-card, #sec-leadmodule .sh-prod-item { border: none; background: var(--sh-surface-low); border-radius: 8px; }
#sec-leadmodule .sh-chk-card:hover, #sec-leadmodule .sh-prod-item:hover { background: var(--sh-surface-container); }
#sec-leadmodule .sh-chk-card:has(input:checked), #sec-leadmodule .sh-prod-item:has(input:checked) { background: #fff3df; box-shadow: inset 3px 0 0 var(--sh-primary-container); }
#sec-leadmodule .sh-prod-cat { color: var(--sh-on-surface-variant); }
#sec-leadmodule .sh-ctx-len { color: var(--sh-outline); }
#sec-leadmodule .sh-ctx-warn { color: var(--sh-error); }
#sec-leadmodule .sh-hbchart .sh-btrack { background: var(--sh-surface-container); }

/* ── Buttons within the module ── */
#sec-leadmodule .btn { display: inline-flex; align-items: center; gap: 6px; }
#sec-leadmodule .btn-primary { color: var(--sh-on-primary-container); font-weight: 700; }
#sec-leadmodule .btn-primary:hover { color: var(--sh-on-primary); }
#sec-leadmodule .btn-xs { font-size: 11px; padding: 4px 8px; }

/* ── Lead drawer (outside the module root) ── */
.sh-drawer-overlay { background: rgba(11, 28, 48, .45); }
.sh-drawer { background: var(--sh-surface-lowest); font-family: var(--sh-font); color: var(--sh-on-surface); box-shadow: var(--sh-shadow-lg); }
.sh-drawer-head { border-bottom-color: var(--sh-surface-container); }
.sh-drawer-title { color: var(--sh-on-surface); font-weight: 700; }
.sh-drawer-foot { border-top-color: var(--sh-surface-container); }

/* ── Agent lead marketplace (agent shell, shells.js) ── */
.sh-market .mk-wallet { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; background: var(--sh-surface-lowest); box-shadow: var(--sh-shadow); border-radius: 12px; padding: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.sh-market .mk-wallet::after { content: ''; position: absolute; right: 0; top: 0; width: 96px; height: 96px; background: var(--sh-surface-low); border-radius: 0 12px 0 100%; pointer-events: none; }
.sh-market .mk-wallet-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--sh-primary-container); color: var(--sh-on-primary-container); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sh-market .mk-wallet-ico .material-symbols-outlined { font-size: 26px; }
.sh-market .mk-wallet-body { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.sh-market .mk-wallet-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
.sh-market .mk-wallet-val { font-size: 30px; line-height: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--sh-on-surface); }
.sh-market .mk-wallet-note { font-size: 12px; color: var(--sh-on-surface-variant); }
.sh-market .mk-status { position: relative; z-index: 1; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--sh-surface-container); color: var(--sh-on-surface-variant); }
.sh-market .mk-status.on { background: var(--sh-ok-bg); color: var(--sh-ok); }
.sh-market .kpi { position: relative; overflow: hidden; }
.sh-market .kpi::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sh-surface-high); }
.sh-market .kpi:first-child::before { background: var(--sh-primary-container); }
.sh-market .mk-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; }
.sh-market .mk-filters .search { flex: 1 1 240px; min-width: 200px; max-width: none; }
.sh-market .mk-filters .search .ico { font-size: 20px; color: var(--sh-outline); }
.sh-market .mk-filters .search input { width: 100%; padding-left: 40px; border: none; background: var(--sh-surface-low); border-radius: 8px; box-sizing: border-box; }
.sh-market .mk-filters .filter-row { margin-bottom: 0; }
.sh-market .terr-btn { border: none; background: var(--sh-surface-low); color: var(--sh-on-surface-variant); border-radius: 8px; font-weight: 600; }
.sh-market .terr-btn:hover { background: var(--sh-surface-container); color: var(--sh-on-surface); }
.sh-market .terr-btn.is-on { background: var(--sh-primary-container); color: var(--sh-on-primary-container); font-weight: 700; }
.sh-market .lead-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sh-market .lead-card { position: relative; overflow: hidden; padding: 16px 16px 14px 22px; border: none; }
.sh-market .lead-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sh-primary-container); }
.sh-market .lead-card:hover { border: none; box-shadow: var(--sh-shadow-lg); }
.sh-market .lead-title { font-size: 15px; font-weight: 700; }
.sh-market .lead-price { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface); font-size: 14px; font-weight: 800; }
.sh-market .lead-foot { border-top: 1px solid var(--sh-surface-container); padding-top: 10px; }
.sh-market .mk-score { font-size: 11px; font-weight: 700; color: var(--sh-on-surface-variant); text-transform: uppercase; letter-spacing: .04em; }
.sh-market .btn-gold { background: var(--sh-primary-container); color: var(--sh-on-primary-container); border: none; font-weight: 700; border-radius: 8px; box-shadow: 0 1px 3px rgba(133, 83, 0, .2); }
.sh-market .btn-gold:hover { background: var(--sh-primary); color: var(--sh-on-primary); filter: none; }
.sh-market .mk-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 48px 24px; background: var(--sh-surface-lowest); border-radius: 12px; box-shadow: var(--sh-shadow); color: var(--sh-on-surface-variant); font-size: 13px; }
.sh-market .mk-empty .material-symbols-outlined { font-size: 36px; color: var(--sh-primary-container); }
.sh-market .mk-empty strong { color: var(--sh-on-surface); font-size: 15px; }

/* ── Responsive ── */
@media (max-width: 980px) {
  #sec-leadmodule .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sec-leadmodule .sh-agent-layout, #sec-leadmodule .sh-push-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #sec-leadmodule .lp-stats { gap: 12px; }
  #sec-leadmodule .sh-srch-in { min-width: 0; width: 100%; }
  #sec-leadmodule .sh-srch { width: 100%; }
  #sec-leadmodule .sh-filters, #sec-leadmodule .sh-tright { width: 100%; }
  #sec-leadmodule .sh-agent-form-grid { grid-template-columns: 1fr; }
  #sec-leadmodule .lp-grid, .sh-market .lead-grid { grid-template-columns: 1fr; }
  .sh-market .kpi-row { grid-template-columns: 1fr 1fr; }
  .sh-market .mk-wallet-val { font-size: 24px; line-height: 30px; }
}

/* ── Marketplace rebuild: wallet actions, filter module, feed + owned tray ── */
.sh-market .mk-wallet-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-market .mk-wallet-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.sh-market .mk-wallet-actions .btn, .sh-market .lead-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.sh-market .btn .material-symbols-outlined, .sh-market .lead-tags .material-symbols-outlined, .sh-market .mk-meta .material-symbols-outlined { font-size: 16px; }
.sh-market .mk-filters { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.sh-market .mk-filter-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sh-market .mk-scope { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-market .mk-scope-lbl, .sh-market .mk-sel span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
.sh-market .mk-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sh-market .mk-sel { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-market .mk-sel select { border: none; background: var(--sh-surface-low); color: var(--sh-on-surface); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 600; outline: none; max-width: 100%; }
.sh-market .mk-sel select:focus { box-shadow: 0 0 0 2px var(--sh-primary-container); background: var(--sh-surface-lowest); }
.sh-market .mk-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; align-items: start; }
.sh-market .mk-feed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sh-market .mk-feed-head strong { display: block; font-size: 16px; font-weight: 700; }
.sh-market .mk-feed-sub { font-size: 12px; color: var(--sh-on-surface-variant); }
.sh-market .mk-sort { min-width: 160px; }
.sh-market .lead-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sh-market .lead-top { align-items: center; }
.sh-market .lead-score { min-width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--sh-surface-container); color: var(--sh-on-surface-variant); flex-shrink: 0; }
.sh-market .lead-score.ok { background: var(--sh-ok-bg); color: var(--sh-ok); }
.sh-market .lead-score.warn { background: #fff4de; color: var(--sh-secondary); }
.sh-market .lead-tags .pill { display: inline-flex; align-items: center; gap: 4px; }
.sh-market .mk-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--sh-on-surface-variant); }
.sh-market .mk-meta span { display: inline-flex; align-items: center; gap: 4px; }
.sh-market .mk-fins { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.sh-market .mk-fin { background: var(--sh-surface-low); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sh-market .mk-fin span { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
.sh-market .mk-fin strong, .sh-market .mk-fin .lead-price { padding: 0; background: none; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.sh-market .lead-foot { flex-wrap: wrap; }
.sh-market .mk-scorewrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 100px; }
.sh-market .mk-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--sh-surface-container); overflow: hidden; }
.sh-market .mk-bar i { display: block; height: 100%; background: var(--sh-primary-container); border-radius: 999px; }
.sh-market .mk-tray { position: sticky; top: 72px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sh-market .mk-tray-head { display: flex; align-items: center; gap: 8px; }
.sh-market .mk-tray-head .material-symbols-outlined { color: var(--sh-primary); }
.sh-market .mk-count { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--sh-surface-container); font-size: 12px; font-weight: 700; }
.sh-market .mk-tray-body { display: flex; flex-direction: column; gap: 8px; }
.sh-market .mk-tray-empty { font-size: 12px; color: var(--sh-on-surface-variant); background: var(--sh-surface-low); border-radius: 8px; padding: 16px; text-align: center; }
.sh-market .mk-owned { display: flex; align-items: center; gap: 10px; background: var(--sh-surface-low); border-radius: 8px; padding: 10px; font-size: 12px; }
.sh-market .mk-owned div { display: flex; flex-direction: column; min-width: 0; }
.sh-market .mk-owned strong { overflow-wrap: anywhere; }
.sh-market .mk-owned span:not(.material-symbols-outlined) { color: var(--sh-on-surface-variant); }
.sh-persona .mk-empty-inline { display: flex; align-items: center; gap: 12px; color: var(--sh-on-surface-variant); font-size: 13px; }
.sh-persona .mk-empty-inline .material-symbols-outlined { font-size: 32px; color: var(--sh-primary-container); flex-shrink: 0; }
.sh-persona .mk-empty-inline strong { display: block; color: var(--sh-on-surface); font-size: 14px; }
@media (max-width: 1100px) {
  .sh-market .mk-layout { grid-template-columns: 1fr; }
  .sh-market .mk-tray { position: static; }
}
@media (max-width: 700px) {
  .sh-market .mk-selects { grid-template-columns: 1fr; }
  .sh-market .mk-wallet-val { font-size: 24px; line-height: 30px; }
}

/* ── Lead Pool & Marketplace (Stitch): header, stats strip, checkbox cards, checkout ── */
.sh-market .lpm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sh-market .lpm-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.sh-market .lpm-crumb { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); margin-bottom: 4px; }
.sh-market .lpm-crumb strong { color: var(--sh-primary); }
.sh-market .lpm-crumb .material-symbols-outlined { font-size: 14px; }
.sh-market .lpm-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-market .lpm-head-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.sh-market .lpm-chip { background: var(--sh-surface-high); color: var(--sh-primary); font-weight: 800; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.sh-market .lpm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.sh-market .lpm-stat { position: relative; overflow: hidden; background: var(--sh-surface-lowest); box-shadow: var(--sh-shadow); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sh-market .lpm-stat::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sh-surface-high); }
.sh-market .lpm-stat:first-child::before { background: var(--sh-primary-container); }
.sh-market .lpm-stat-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
.sh-market .lpm-stat-val { font-size: 26px; line-height: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--sh-on-surface); overflow-wrap: anywhere; }
.sh-market .lpm-stat-val small { font-size: 12px; font-weight: 600; color: var(--sh-on-surface-variant); letter-spacing: 0; }
.sh-market .lpm-stat-ico { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 8px; background: var(--sh-surface-low); color: var(--sh-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.sh-market .lpm-stat-note { font-size: 12px; color: var(--sh-on-surface-variant); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sh-market .mk-selects { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-market .lpm-check { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; cursor: pointer; }
.sh-market .lpm-check input { width: 16px; height: 16px; accent-color: var(--sh-primary-container); flex-shrink: 0; }
.sh-market .lpm-check .lead-title { overflow-wrap: anywhere; }
.sh-market .lead-card.is-selected { box-shadow: 0 0 0 2px var(--sh-primary-container), var(--sh-shadow); }
.sh-market .mk-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }
.sh-market .mk-side .mk-tray { position: static; }
.sh-market .mk-cart { padding: 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.sh-market .mk-cart-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.sh-market .mk-cart-row { display: flex; justify-content: space-between; gap: 10px; background: var(--sh-surface-low); border-radius: 8px; padding: 10px; font-size: 12px; }
.sh-market .mk-cart-row div { display: flex; flex-direction: column; min-width: 0; }
.sh-market .mk-cart-row strong { overflow-wrap: anywhere; }
.sh-market .mk-cart-row span { color: var(--sh-on-surface-variant); }
.sh-market .mk-cart-row em { font-style: normal; font-weight: 800; white-space: nowrap; }
.sh-market .mk-cart-sum { background: var(--sh-surface-low); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.sh-market .mk-cart-sum div { display: flex; justify-content: space-between; gap: 8px; }
.sh-market .mk-cart-sum span { color: var(--sh-on-surface-variant); }
.sh-market .mk-cart .btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.sh-market .btn-gold:disabled { opacity: .5; cursor: not-allowed; }
.sh-market .mk-cart-note { margin: 0; font-size: 11px; color: var(--sh-on-surface-variant); }
@media (max-width: 1100px) {
  .sh-market .mk-side { position: static; }
  .sh-market .lpm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-market .mk-selects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sh-market .lpm-stats, .sh-market .mk-selects { grid-template-columns: 1fr; }
}
