/* N1 Leads tabs (Companies | People + Stage filter). Lives inside the sidebar
   shell main pane. Below 860 px the table reflows into stacked rows, so the
   page never scrolls sideways. */
.leads-tabs-card { box-sizing:border-box; max-width:100%; margin:0 0 20px; padding:16px; border:1px solid #e3e6ea; border-radius:12px; background:#fff; }
.leads-tabs-card * { box-sizing:border-box; }
.leads-tabs-top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.leads-tabs { display:flex; gap:4px; border-bottom:1px solid #e3e6ea; }
.leads-tabs a { padding:8px 14px; color:#4a5260; text-decoration:none; border-bottom:2px solid transparent; font-weight:600; }
.leads-tabs a[aria-current="page"] { color:#111827; border-bottom-color:#2f6fed; }
.leads-stage { display:flex; flex-wrap:wrap; gap:8px; align-items:end; }
.leads-stage label { display:grid; gap:4px; font-size:12px; color:#4a5260; }
.leads-stage select { min-height:36px; }
.leads-stage-note { margin:10px 0; color:#5b6472; font-size:13px; }
.leads-grid-wrap { max-width:100%; overflow-x:auto; }
.leads-grid { width:100%; border-collapse:collapse; font-size:13px; }
.leads-grid th { text-align:left; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#5b6472; padding:8px; border-bottom:1px solid #e3e6ea; white-space:nowrap; }
.leads-grid td { padding:8px; border-bottom:1px solid #f0f2f5; vertical-align:top; overflow-wrap:anywhere; }
.leads-clip span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; max-width:28ch; }
.leads-nil { color:#9aa3af; }
.leads-stage-badge { display:inline-block; padding:0 6px; border-radius:6px; background:#eef1f5; color:#3b4452; font-size:11px; }
.leads-chip { display:inline-block; padding:0 6px; border-radius:6px; font-size:11px; background:#eef1f5; }
.leads-chip.ok { background:#e5f5ea; color:#17643a; }
.leads-chip.warn { background:#fff4e0; color:#8a5a00; }
.leads-chip.bad { background:#fde8e8; color:#9b1c1c; }
.leads-chip.muted { background:#eef1f5; color:#5b6472; }
.leads-empty,.leads-inactive { margin:12px 0; padding:14px; border:1px dashed #cfd5dd; border-radius:10px; color:#4a5260; }
.leads-pager { display:flex; gap:16px; margin-top:12px; }
.leads-person-row { cursor:pointer; }
.leads-person-row:hover, .leads-person-row:focus { background:#f6f8fb; outline:none; }
.leads-person-drawer { border:1px solid #d5dae2; border-radius:0; padding:0; margin:0; width:min(420px,100vw); max-width:100vw; height:100vh; max-height:100vh; position:fixed; top:0; right:0; left:auto; box-shadow:-12px 0 32px #10203822; }
.leads-person-drawer[open], .leads-person-drawer:modal { display:flex; flex-direction:column; }
.leads-person-drawer::backdrop { background:#10203866; }
.leads-drawer-head { display:flex; justify-content:flex-end; padding:8px 12px 0; }
.leads-drawer-close { border:0; background:transparent; font-size:28px; line-height:1; cursor:pointer; color:#4a5260; padding:4px 8px; }
.leads-drawer-title { padding:0 20px 12px; border-bottom:1px solid #e3e6ea; }
.leads-drawer-title h2 { margin:4px 0 8px; font-size:22px; }
.leads-drawer-eyebrow { margin:0; color:#5b6472; font-size:13px; }
.leads-drawer-deep { margin:0; font-size:12px; color:#5b6472; }
.leads-fact-list { margin:0; padding:12px 20px 24px; overflow:auto; }
.leads-fact { display:grid; gap:4px; padding:12px 0; border-bottom:1px solid #f0f2f5; }
.leads-fact dt { font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#5b6472; }
.leads-fact dd { margin:0; font-size:14px; color:#111827; overflow-wrap:anywhere; }
.leads-fact-source { margin-top:6px; font-size:12px; }
.leads-source-link { color:#2f6fed; }
.leads-source-meta { color:#5b6472; }
@media (max-width:859px) {
  .leads-tabs-card { padding:12px; }
  .leads-grid-wrap { overflow-x:visible; }
  .leads-grid thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .leads-grid, .leads-grid tbody, .leads-grid tr, .leads-grid td { display:block; width:100%; }
  .leads-grid tr { padding:10px 0; border-bottom:1px solid #e3e6ea; }
  .leads-grid td { display:grid; grid-template-columns:minmax(90px,35%) 1fr; gap:8px; padding:3px 0; border:0; }
  .leads-grid td::before { content:attr(data-label); color:#5b6472; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
  .leads-clip span { max-width:none; }
  .leads-person-drawer { width:100vw; }
}

/* N5: country and stage controls reflow inside the existing sidebar pane. */
.leads-stage { flex-wrap: wrap; }
.leads-stage input[name="country"] { width: 5rem; max-width: 100%; padding: .45rem; border: 1px solid #d1d5db; border-radius: .35rem; }
[data-export-status] { min-height: 1.5em; margin: .5rem 0; }
[data-people-export][aria-busy="true"] { opacity: .65; }
