/* ext_lead_board_pipeline.css — vertical + horizontal pipeline on the Lead Board */

/* ── the cell ─────────────────────────────────────────────────────────────── */
.lbp-th sub, .lbp-thsub {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--text-3);
  text-transform: none;
}
.lbp-load { color: var(--text-3); font-size: 11px; }
.lbp-none { color: var(--text-3); font-size: 11px; }

/* ── the cell — it is a BUTTON, so it must look like one ─────────────────── */
.lbp-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 5px 7px 5px 8px;
  border-radius: 7px;
  background: var(--bg-2, #1b2230);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
/* Hover reads as FOCUS, not alert. The state dot (green) and the progress bar
   (blue) already carry meaning, so the cell's own affordance uses a neutral
   bright lift + a blue focus ring — the same hue the UI uses for interaction.
   Nothing here reuses a status colour, so hovering can't be mistaken for a flag. */
.lbp-cell:hover {
  background: var(--bg-3, #222b3b);
  border-color: #6fb7ff;
  box-shadow: 0 0 0 2px rgba(111, 183, 255, .2), 0 1px 5px rgba(0, 0, 0, .3);
}
.lbp-cell:hover .lbp-chip { color: #fff; }
.lbp-cell:hover .lbp-stage { color: var(--text-1, #dfe6ee); }
.lbp-cell:hover .lbp-bar { background: rgba(255, 255, 255, .3); }
.lbp-cell:hover .lbp-bar b { filter: brightness(1.15); }
.lbp-cell:active { transform: translateY(1px); }
.lbp-cell:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(111, 183, 255, .35);
}
.lbp-cell.lbp-open {
  border-color: var(--accent);
  background: var(--bg-3, #222b3b);
}
.lbp-cell:hover .lbp-caret,
.lbp-cell.lbp-open .lbp-caret { opacity: 1; transform: none; }

.lbp-main {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0; flex: 1;
}
.lbp-vert { display: flex; flex-wrap: wrap; gap: 3px 8px; }
.lbp-horz { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* the caret is the affordance — always visible, vertically centred on the
   card so it matches every other dropdown in the row */
.lbp-caret {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  line-height: 1;
  color: #9aa4b2;
  opacity: 1;
  transition: opacity .12s, color .12s;
}
.lbp-cell:hover .lbp-caret,
.lbp-cell.lbp-open .lbp-caret { color: #6fb7ff; }

.lbp-empty-cell { color: var(--text-3); font-style: italic; }
.lbp-plus { font-style: normal; font-weight: 700; color: var(--accent); }

/* ── vertical: brand + state name. The dot repeats the state colour as a
   second channel (glanceable scanning); the text carries the meaning ─────── */
.lbp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; line-height: 1.5;
  color: var(--text-1, #dfe6ee); white-space: nowrap;
}
.lbp-chip i {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex: 0 0 auto;
  background: var(--c, #6b7a90);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.lbp-chip em {
  font-style: normal; font-weight: 500;
  color: var(--text-3, #768390);
  margin-left: 1px;
}

/* ── horizontal: a labelled progress bar per sale ───────────────────────── */
.lbp-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lbp-bar {
  height: 8px;
  background: rgba(255, 255, 255, .22);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.lbp-bar b {
  display: block; height: 100%;
  background: linear-gradient(90deg, #4c9bff, #3ec28f);
  border-radius: 4px;
  transition: width .2s;
}
.lbp-stage {
  font-size: 10px; color: var(--text-2, #adbac7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.lbp-more { font-size: 9.5px; color: var(--text-3); font-style: italic; }

/* ── popover ──────────────────────────────────────────────────────────────── */
.lbp-pop {
  position: absolute; z-index: 9000; top: 100%; left: 0;
  width: 460px; max-height: 62vh; overflow: auto;
  background: var(--bg-1, #141a22);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  padding: 10px 12px 14px;
  font-size: 12px;
  cursor: default;
}
.lbp-pophead {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.lbp-pophead b { font-size: 13px; }
.lbp-hint { font-size: 10px; color: var(--text-3); flex: 1; }
.lbp-x {
  background: none; border: 0; color: var(--text-3);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.lbp-x:hover { color: var(--danger, #ef4444); }

.lbp-section { margin-bottom: 12px; }
.lbp-secttl {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-3); margin-bottom: 6px;
}
.lbp-secttl em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }

.lbp-rel, .lbp-sale {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 9px; margin-bottom: 6px;
}
.lbp-reltop, .lbp-saletop {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.lbp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 11.5px;
}
.lbp-badge i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--c, #6b7a90);
}
.lbp-state { font-size: 11px; color: var(--text-2); }
.lbp-agent, .lbp-method, .lbp-saleb {
  font-size: 10px; color: var(--text-3);
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}
.lbp-lostwhy { font-size: 10.5px; color: var(--danger, #ef4444); margin-top: 4px; }

.lbp-moves { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.lbp-mv {
  font-size: 10.5px; padding: 3px 8px; cursor: pointer;
  background: var(--bg-1); color: var(--text-1, #dfe6ee);
  border: 1px solid var(--line); border-radius: 5px;
}
.lbp-mv:hover { border-color: var(--accent); color: var(--accent); }
.lbp-mv.lbp-lost:hover { border-color: var(--danger, #ef4444); color: var(--danger, #ef4444); }
.lbp-end { font-size: 10px; color: var(--text-3); font-style: italic; }

.lbp-saleid { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.lbp-kind {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 1px 5px; border-radius: 4px;
}
.lbp-kind.k-new      { background: rgba(59,130,246,.18);  color: #6ba4ff; }
.lbp-kind.k-relation { background: rgba(168,85,247,.18);  color: #c084fc; }
.lbp-kind.k-transfer { background: rgba(245,158,11,.18);  color: #fbbf24; }

.lbp-steps {
  display: flex; align-items: center; gap: 3px;
  flex-wrap: wrap; row-gap: 5px;
  margin-top: 7px; padding-right: 4px;
}
.lbp-step {
  font-size: 10px; padding: 3px 7px; cursor: pointer;
  background: var(--bg-1); color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px;
  max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 0 0 auto;
}
.lbp-step:hover { border-color: var(--accent); color: var(--text-1, #dfe6ee); }
.lbp-step.done { background: rgba(62,194,143,.12); color: #3ec28f; border-color: rgba(62,194,143,.35); }
.lbp-step.cur  { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.lbp-arrow { color: var(--text-3); font-size: 10px; }
.lbp-nostage { font-size: 10.5px; color: var(--text-3); font-style: italic; margin-top: 5px; }

.lbp-roles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.lbp-role { font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.lbp-role em {
  font-style: normal; color: var(--text-3);
  text-transform: uppercase; font-size: 8.5px;
  letter-spacing: .4px; margin-right: 5px;
}
.lbp-role em::after { content: ":"; }

.lbp-empty {
  font-size: 11px; color: var(--text-3); font-style: italic;
  padding: 6px 0;
}

.lbp-popfoot {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line);
}
.lbp-add {
  font-size: 10.5px; padding: 4px 9px; cursor: pointer;
  background: var(--bg-2); color: var(--text-1, #dfe6ee);
  border: 1px solid var(--line); border-radius: 5px;
}
.lbp-add:hover { border-color: var(--accent); color: var(--accent); }
.lbp-link {
  margin-left: auto; font-size: 10.5px;
  color: var(--accent); text-decoration: none;
}
.lbp-link:hover { text-decoration: underline; }

/* ── kanban card strip ────────────────────────────────────────────────────── */
.lbp-cardstrip {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.lbp-cardstrip .lbp-cell { width: 100%; }