/* Company Intel — list + detail editor
 * Mirrors buyer-admin.css layout pattern.
 * All rules scoped under #company-intel-root or .ci-* classes.
 */

#company-intel-root { display: none; }
body.mode-company-intel #company-intel-root { display: block; }
body.mode-company-intel form#config-form { display: none; }
body.mode-company-intel #funnel-tab { display: none !important; }
body.mode-company-intel .tab-bar { display: none; }
body.mode-company-intel .admin-main {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Two-column layout */
.ci-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 16px 24px 32px;
  min-height: calc(100vh - 220px);
}

/* Left list panel */
.ci-list-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}
.ci-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ci-list-header h3 { margin: 0; font-size: 14px; font-weight: 600; color: #374151; }
.ci-add-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.ci-add-btn:hover { background: #2563eb; }
.ci-search {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.ci-search:focus { outline: none; border-color: #3b82f6; }
.ci-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ci-row {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: background 100ms, border-color 100ms;
}
.ci-row:hover { background: #f9fafb; }
.ci-row.active { background: #eff6ff; border-color: #3b82f6; }
.ci-row-main { font-size: 13px; color: #111827; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ci-row-main strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-row-meta { font-size: 11px; color: #6b7280; margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.ci-empty { padding: 16px; font-size: 12px; color: #9ca3af; text-align: center; }

/* Source type badge */
.ci-source-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ci-source-badge.buyer { background: #dbeafe; color: #1e40af; }
.ci-source-badge.partner { background: #fef3c7; color: #92400e; }
.ci-source-badge.manual { background: #e5e7eb; color: #6b7280; }

/* Enrichment status dot */
.ci-enriched-dot { color: #10b981; font-size: 9px; flex-shrink: 0; }
.ci-no-domain-dot { color: #f59e0b; font-size: 9px; flex-shrink: 0; cursor: help; }

/* Right editor panel */
.ci-editor-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 24px;
  min-height: 600px;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}
.ci-editor-empty {
  padding: 80px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* Editor header */
.ci-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}
.ci-editor-header h2 { margin: 0; font-size: 18px; font-weight: 600; color: #111827; }
.ci-editor-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.ci-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.ci-btn-primary { background: #3b82f6; color: #fff; }
.ci-btn-primary:hover { background: #2563eb; }
.ci-btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.ci-btn-secondary:hover { background: #e5e7eb; }
.ci-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ci-dirty-badge { color: #f59e0b; font-size: 12px; font-weight: 500; }

/* Intel summary card (read-only enrichment display) */
.ci-intel-card {
  padding: 16px;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.ci-intel-card h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #1e40af; }
.ci-intel-card p { margin: 0 0 12px; color: #1e3a5f; }
.ci-intel-card p:last-child { margin-bottom: 0; }
.ci-intel-card ul { margin: 4px 0 12px; padding-left: 18px; }
.ci-intel-card li { margin-bottom: 4px; color: #1e3a5f; }
.ci-intel-as-of { font-size: 11px; color: #6b7280; margin-bottom: 12px; }
.ci-intel-warning {
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
  margin-bottom: 12px;
}
.ci-intel-no-data { color: #9ca3af; font-style: italic; }

/* Sources list */
.ci-sources { margin-top: 12px; }
.ci-sources a { font-size: 12px; color: #3b82f6; text-decoration: none; }
.ci-sources a:hover { text-decoration: underline; }

/* Overrides section */
.ci-overrides-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
  margin-top: 20px;
}
.ci-overrides-section h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: #374151; }
.ci-field { margin-bottom: 14px; }
.ci-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}
.ci-field input, .ci-field textarea, .ci-field select {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
}
.ci-field input:focus, .ci-field textarea:focus { outline: none; border-color: #3b82f6; }
.ci-field-note { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.ci-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Banner */
.ci-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}
.ci-banner.ok { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.ci-banner.err { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }

/* Add company modal (inline) */
.ci-add-form {
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
}
.ci-add-form input {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.ci-add-form-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Spinner for refresh button */
.ci-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: ci-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes ci-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Phase 3 — review pipeline UI
   ============================================================ */

/* AI-disclosure header strip — persistent reminder that data is
   AI-derived and the relationship owner is accountable. */
.ci-disclosure-strip {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 12px;
  color: #1e40af;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ci-disclosure-strip .ci-disclosure-meta { font-weight: 500; color: #3730a3; }

/* Phase 5 — cross-reference cue. Tells the operator the Intel they're
   looking at applies to multiple offers under the same advertiser, so
   edits propagate. Quieter than the disclosure strip (slate, not blue)
   because it's informational, not load-bearing. */
.ci-applies-strip {
  margin: 0 0 12px;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
}
.ci-applies-strip strong { color: #0f172a; }

/* Pending-review banner — amber, prominent, sits above the live
   intel card so the operator sees the proposed update before
   spending time looking at the live data underneath. */
.ci-pending-banner {
  margin: 0 0 16px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  overflow: hidden;
}
.ci-pending-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #fde68a;
  font-size: 13px;
  color: #92400e;
}
.ci-pending-header strong { color: #78350f; }
.ci-pending-actions { display: flex; gap: 6px; }

/* Field-level diff: 2-column current/proposed for each changed field. */
.ci-diff-list { padding: 8px 14px 12px; }
.ci-diff-row {
  padding: 10px 0;
  border-bottom: 1px solid #fde68a;
}
.ci-diff-row:last-child { border-bottom: none; }
.ci-diff-label {
  font-size: 12px;
  font-weight: 600;
  color: #78350f;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ci-diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ci-diff-col {
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
}
.ci-diff-side {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.ci-diff-val {
  font-size: 13px;
  color: #374151;
  white-space: pre-wrap;
  line-height: 1.45;
}
.ci-diff-val.ci-diff-new {
  color: #1e3a8a;
  background: #eff6ff;
  border-radius: 4px;
  padding: 4px 6px;
  margin: -4px -6px;
}
.ci-diff-val em { color: #9ca3af; font-style: italic; }
.ci-diff-nochange {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  margin: 0;
}

/* Per-field confidence pill — color-coded by tier. */
.ci-confidence-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.ci-confidence-high { background: #d1fae5; color: #065f46; }
.ci-confidence-med  { background: #fef3c7; color: #92400e; }
.ci-confidence-low  { background: #fee2e2; color: #991b1b; }

/* List filter — All / Pending review with count. Sits below the
   search input. The pending count badge turns amber when > 0 so
   operators can see queue depth at a glance. */
.ci-list-filter {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.ci-list-filter button {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ci-list-filter button:hover { background: #f3f4f6; }
.ci-list-filter button.active {
  background: #1f2937; color: #fff; border-color: #1f2937;
}
.ci-list-filter button .n {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ci-list-filter button.active .n { color: #fff; }
.ci-list-filter button .n.alert {
  background: #f59e0b;
  color: #fff;
  padding: 0 6px;
  border-radius: 999px;
}

/* Pending-review marker on list rows. */
.ci-pending-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  margin: 0 4px;
}

/* Entity-identity row — Phase 4d-1. Compact 1-line display of the
   canonical website (when resolved) or status (ambiguous / not_found
   / not yet resolved). Pending-review note appears on a second line
   when an identity proposal is awaiting operator approval. */
.ci-identity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
}
.ci-identity-row.ci-identity-unresolved {
  background: #fffbeb;
  border-color: #fde68a;
}
.ci-identity-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ci-identity-value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-weight: 500;
}
.ci-identity-value a {
  color: #2563eb;
  text-decoration: none;
}
.ci-identity-value a:hover { text-decoration: underline; }
.ci-identity-value.ci-identity-muted {
  color: #6b7280;
  font-style: italic;
  font-weight: 400;
}
.ci-identity-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ci-identity-status-resolved { background: #d1fae5; color: #065f46; }
.ci-identity-status-ambiguous { background: #fef3c7; color: #92400e; }
.ci-identity-status-not-found { background: #fee2e2; color: #991b1b; }
.ci-identity-pending {
  flex-basis: 100%;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #fde68a;
  font-size: 11px;
  color: #92400e;
}

/* Phase 4d-1.1 — pending review block + alternates picker. The
   identity row layout becomes 2-tier: a top "live status" line, and
   a bottom block that's only present when a pending resolution
   awaits operator review. */
.ci-identity-row {
  display: block;  /* override the flex shape from Phase 4d-1 */
}
.ci-identity-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ci-identity-actions {
  margin-left: auto;
}
.ci-btn-xs {
  padding: 2px 8px;
  font-size: 11px;
  height: auto;
}
.ci-identity-pending-block {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
}
.ci-identity-pending-header {
  font-size: 11px;
  color: #92400e;
  margin-bottom: 6px;
}
.ci-identity-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.ci-identity-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.ci-identity-option:has(input:checked) {
  background: #fef3c7;
  border-color: #f59e0b;
}
.ci-identity-option input[type="radio"] {
  margin: 0;
}
.ci-identity-option-label {
  font-weight: 500;
  color: #78350f;
  min-width: 100px;
}
.ci-identity-option-url {
  color: #2563eb;
  text-decoration: none;
  flex: 1;
  word-break: break-all;
}
.ci-identity-option-url:hover { text-decoration: underline; }
.ci-identity-pending-empty {
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
  padding: 6px;
}
.ci-identity-pending-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ============================================================
   Phase 4d-2 — claims-with-citations block
   ============================================================ */

/* Pending claims block — amber, sits above the live claims when the
   Intel worker has proposed an update awaiting operator review. */
.ci-claims-pending {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.ci-claims-pending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #92400e;
}
.ci-claims-pending-actions { display: flex; gap: 6px; }

.ci-claims-live { margin: 0 0 12px; }
.ci-claims-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* Claims grid — one column on narrow, but each claim is full-width
   anyway because values can be long. */
.ci-claims-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ci-claim {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
}
.ci-claim-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ci-claim-value {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.45;
  margin-bottom: 6px;
}
.ci-claim-date { color: #6b7280; font-size: 11px; }

/* Claim list (leadership / news) — labeled group of mini-claims. */
.ci-claim-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
}
.ci-claim-list-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.ci-claim-list .ci-claim {
  border: none;
  background: transparent;
  padding: 4px 0;
  border-top: 1px dashed #f3f4f6;
}
.ci-claim-list .ci-claim:first-of-type { border-top: none; }
.ci-claim-list-item .ci-claim-value {
  margin-bottom: 4px;
  font-size: 12px;
}

/* Confidence pill on claims — derived from corroboration count, not
   LLM self-rating. high = ≥2 T1-T2 cites, medium = 1, low = T3+ only. */
.ci-claim-conf {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ci-claim-conf-high { background: #d1fae5; color: #065f46; }
.ci-claim-conf-medium { background: #fef3c7; color: #92400e; }
.ci-claim-conf-low { background: #fee2e2; color: #991b1b; }
.ci-claim-conf-disputed { background: #fce7f3; color: #9d174d; }

/* Phase 4d-2.1 — disputed values display. When sources disagree, the
   primary value is shown normally, then this block surfaces the
   alternate values pink-tagged below so the operator sees the
   conflict without having to read every source excerpt. */
.ci-claim-disputed {
  margin: 0 0 6px;
  padding: 6px 8px;
  background: #fdf2f8;
  border-left: 3px solid #ec4899;
  border-radius: 4px;
  font-size: 11px;
  color: #831843;
}
.ci-claim-disputed-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 6px;
}
.ci-claim-disputed-value {
  display: inline-block;
  background: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #fbcfe8;
  margin-right: 4px;
}

/* Source chips — one per citation supporting the claim. Tier-coded,
   clickable, hover reveals the cited excerpt. */
.ci-claim-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 10px;
}
.ci-claim-sources-none {
  color: #ef4444;
  font-style: italic;
  font-weight: 500;
}
.ci-source-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, monospace;
  border: 1px solid transparent;
}
.ci-source-chip:hover { text-decoration: underline; }
.ci-source-chip-primary    { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.ci-source-chip-news       { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.ci-source-chip-aggregator { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.ci-source-chip-pr         { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.ci-source-chip-low        { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.ci-claims-empty {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================================
   Phase 4d-3 — risk-signals block
   ============================================================ */

/* Risk-clean affirmative — green pill that explicitly signals
   "scanned, no signals" so operators can tell that's distinct from
   "haven't checked." */
.ci-risk-clean {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 12px;
  margin: 0 0 12px;
}
.ci-risk-clean-icon { color: #16a34a; font-weight: 700; font-size: 14px; }
.ci-risk-clean-label { color: #166534; font-weight: 600; }
.ci-risk-clean-meta { color: #6b7280; font-style: italic; }

/* Risk banner — non-empty live state. Plain by default, red border
   accent when high-severity signals are present. */
.ci-risk-banner {
  margin: 0 0 8px;
  padding: 8px 12px;
  background: #f9fafb;
  border-left: 3px solid #6b7280;
  border-radius: 4px;
  font-size: 12px;
  color: #374151;
}
.ci-risk-banner.ci-risk-banner-high {
  background: #fef2f2;
  border-left-color: #dc2626;
  color: #7f1d1d;
}
.ci-risk-live { margin: 0 0 12px; }
.ci-risk-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* Pending risk review banner — same amber treatment as other
   pending blocks but with severity counts surfaced in the header. */
.ci-risk-pending {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}
.ci-risk-pending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #92400e;
}
.ci-risk-pending-actions { display: flex; gap: 6px; }
.ci-risk-high-count {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Signal list — one row per signal, color-coded by severity. */
.ci-risk-signals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ci-risk-signal {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left-width: 3px;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
}
.ci-risk-signal-high   { border-left-color: #dc2626; background: #fef2f2; }
.ci-risk-signal-medium { border-left-color: #f59e0b; background: #fffbeb; }
.ci-risk-signal-low    { border-left-color: #6b7280; }
.ci-risk-signal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 10px;
  color: #6b7280;
}
.ci-risk-signal-sev {
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ci-risk-signal-sev-high   { background: #fee2e2; color: #991b1b; }
.ci-risk-signal-sev-medium { background: #fef3c7; color: #92400e; }
.ci-risk-signal-sev-low    { background: #f3f4f6; color: #374151; }
.ci-risk-signal-type {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}
.ci-risk-signal-date { color: #9ca3af; margin-left: auto; }
.ci-risk-signal-summary {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* ============================================================
   Phase 4d-4 — pipeline-status mini-row + run-full button
   ============================================================ */

.ci-pipeline-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  flex-wrap: wrap;
}
.ci-pipeline-pills {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}
.ci-pipeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid;
}
.ci-pipeline-pill .ci-pipeline-icon {
  font-weight: 700;
  font-size: 13px;
}
.ci-pipeline-pill .ci-pipeline-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ci-pipeline-pill .ci-pipeline-state {
  color: #6b7280;
  font-style: italic;
}

.ci-pipeline-resolved {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.ci-pipeline-resolved .ci-pipeline-icon { color: #16a34a; }
.ci-pipeline-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}
.ci-pipeline-pending .ci-pipeline-icon { color: #d97706; }
.ci-pipeline-failed {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}
.ci-pipeline-failed .ci-pipeline-icon { color: #dc2626; }
.ci-pipeline-gated {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}
.ci-pipeline-gated .ci-pipeline-icon { color: #6b7280; }
.ci-pipeline-idle {
  background: #fff;
  border-color: #e5e7eb;
  color: #9ca3af;
}
.ci-pipeline-risk-high {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}
.ci-pipeline-risk-high .ci-pipeline-icon { color: #dc2626; font-size: 14px; }
.ci-pipeline-risk-high .ci-pipeline-state { color: #991b1b; font-style: normal; font-weight: 600; }

/* Inline panel — embedded on buyer / offer detail pages.
   The shared ci-* rules above (disclosure strip, pending banner,
   confidence pills, intel card) work as-is. These rules cover
   the inline-only states. */
.ci-inline-loading {
  padding: 16px;
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
}
.ci-inline-empty {
  padding: 16px;
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}
.ci-inline-empty p { margin: 0 0 8px; }
.ci-inline-empty .ci-inline-meta {
  font-size: 11px;
  color: #9ca3af;
}
.ci-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.ci-inline-link {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}
.ci-inline-link:hover { text-decoration: underline; }
.ci-inline-error {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
}
