/* Leads coverage-matrix view (static/leads_tab.js). Reuses the SKU grid table
   shell (.sku-table via .leads-table) and adds the per-cell status colors +
   the small inline status chips used in the help/legend. Scoped under
   #leads-view / .leads-* so nothing here leaks into the other tabs. */

#leads-view .leads-loading {
  padding: 24px;
  text-align: center;
  color: var(--muted, #7a8699);
}

#leads-view .leads-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
#leads-view .leads-custom label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted, #7a8699);
}

/* Table shell — mirror .sku-table so column/hover/zebra styling is shared. */
#leads-view .leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#leads-view .leads-table th,
#leads-view .leads-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #22293a);
  white-space: nowrap;
  text-align: center;
}
#leads-view .leads-table th.col-left,
#leads-view .leads-table td.col-left {
  text-align: left;
}
#leads-view .leads-table thead th {
  position: sticky;
  top: 0;
  background: var(--panel, #0e1420);
  z-index: 1;
  cursor: pointer;
  user-select: none;
}
#leads-view .leads-table th[data-nosort] {
  cursor: default;
}
#leads-view .leads-table tbody tr:hover {
  background: var(--panel-hover, rgba(255, 255, 255, 0.03));
}
#leads-view .leads-cov-th {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

/* Clickable company + dossier cells. */
#leads-view .leads-company-link,
#leads-view .leads-dossier-link {
  background: none;
  border: none;
  color: var(--link, #6ea8fe);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}
#leads-view .leads-company-link:hover,
#leads-view .leads-dossier-link:hover {
  text-decoration: underline;
}
#leads-view .leads-dossier-none {
  color: var(--muted, #7a8699);
}

/* SKU code cell. */
#leads-view .leads-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted, #9aa7bd);
}

/* Status cells + inline chips (shared color language). */
.lead-st {
  display: inline-block;
  min-width: 78px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.lead-st--na {
  color: var(--muted, #6b7688);
  background: transparent;
}
.lead-st--pending {
  color: #d9a441;
  background: rgba(217, 164, 65, 0.14);
}
.lead-st--submitted {
  color: #9a8fd6;
  background: rgba(154, 143, 214, 0.16);
}
.lead-st--placed {
  color: #5aa9e6;
  background: rgba(90, 169, 230, 0.14);
}
.lead-st--bound {
  color: #4bb06f;
  background: rgba(75, 176, 111, 0.16);
}

/* Compact per-cell rendering inside the matrix (smaller than the legend chip). */
#leads-view td.leads-cell .lead-st {
  min-width: 0;
  padding: 1px 7px;
}
#leads-view td.leads-cell-na {
  color: var(--muted, #4d5666);
}

/* Urgency pill. */
.lead-urg {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.lead-urg--critical { color: #ff6b6b; background: rgba(255, 107, 107, 0.16); }
.lead-urg--high { color: #ff9f43; background: rgba(255, 159, 67, 0.16); }
.lead-urg--medium { color: #f7c948; background: rgba(247, 201, 72, 0.14); }
.lead-urg--low { color: #7a8699; background: rgba(122, 134, 153, 0.12); }

/* Exp. value cell + honesty badge (quote / partial / est.). */
#leads-view td.leads-ev { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lead-ev-val { font-weight: 600; }
.lead-ev-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}
.lead-ev-badge--quote { color: #51cf66; background: rgba(81, 207, 102, 0.14); }
.lead-ev-badge--partial { color: #f7c948; background: rgba(247, 201, 72, 0.14); }
.lead-ev-badge--est { color: #7a8699; background: rgba(122, 134, 153, 0.14); }
