/* Leader review: a sales leader's scoped Collaborator view */

/* ---------- Who + scope ---------- */

.bbi-lr-who {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}

.bbi-lr-who .bbi-avatar { width: 40px; height: 40px; }
.bbi-lr-who__name b { display: block; font-size: 15px; font-weight: 800; color: var(--bbi-ink); line-height: 1.25; }
.bbi-lr-who__name small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }
.bbi-lr-role { height: 28px; font-size: 13px; }

.bbi-lr-sep { width: 1px; height: 34px; background: var(--bbi-line); }

.bbi-lr-scope { display: flex; align-items: center; gap: 10px; }
.bbi-lr-scope b { display: block; font-size: 15px; font-weight: 800; color: var(--bbi-ink); line-height: 1.25; }
.bbi-lr-scope small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

.bbi-lr-others { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.bbi-lr-others small { font-size: 11px; font-weight: 700; color: #aab4c8; }
.bbi-lr-others > span { display: flex; gap: 6px; }

.bbi-lr-other {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px dashed #d5dbea;
  font-size: 12px;
  font-weight: 700;
  color: #aab4c8;
  background: var(--bbi-surface-2);
}

.bbi-lr-other svg { width: 12px; height: 12px; }

/* ---------- Account List ---------- */

.bbi-lr-list { display: flex; flex-direction: column; }
.bbi-lr-list .bbi-card__head { flex: none; }

.bbi-lr-node {
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--bbi-surface-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  color: var(--bbi-muted);
}

.bbi-lr-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--bbi-surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.bbi-lr-locked svg { width: 13px; height: 13px; }
.bbi-lr-locked b { font-size: 14px; font-weight: 800; color: var(--bbi-ink); font-variant-numeric: tabular-nums; }
.bbi-lr-locked.is-on { background: #fff1db; color: #b45309; }
.bbi-lr-locked.is-on b { color: #b45309; }

.bbi-lr-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  margin: 0 16px;
  padding: 0 6px 0 12px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
}

.bbi-lr-bar__sel { font-size: 13px; font-weight: 700; color: var(--bbi-muted); }
.bbi-lr-bar__sel b { color: var(--bbi-ink); font-weight: 800; font-variant-numeric: tabular-nums; }

.bbi-lr-bulk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin-left: auto;
  padding: 0 10px 0 12px;
  border-radius: 9px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-indigo);
  opacity: 0.55;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
}

.bbi-lr-bulk.is-ready { opacity: 1; border-color: rgba(94, 114, 228, 0.35); }
.bbi-lr-bulk.is-pressed { transform: scale(0.95); }
.bbi-lr-chev { width: 12px; height: 12px; flex: none; }

.bbi-lr-cols,
.bbi-lr-row {
  display: grid;
  grid-template-columns: 20px 1fr 46px 28px 142px;
  align-items: center;
  column-gap: 10px;
}

.bbi-lr-cols {
  flex: none;
  height: 34px;
  margin: 6px 16px 0;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-lr-cols span:last-child { grid-column: 4 / span 2; }

.bbi-lr-rows { padding: 0 16px; }

.bbi-lr-row {
  height: 44px;
  padding: 0 8px;
  border-top: 1px solid var(--bbi-line);
  border-radius: 10px;
  transition: background-color 0.4s ease;
}

.bbi-lr-row.is-selected { background: rgba(94, 114, 228, 0.05); }
.bbi-lr-row.is-locked { background: #fffaf0; }

.bbi-lr-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #cfd6ea;
  background: #fff;
  color: #fff;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.bbi-lr-check svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.4); transition: opacity 0.2s ease, transform 0.3s var(--bbi-spring); }
.bbi-lr-check.is-on { background: var(--bbi-indigo); border-color: var(--bbi-indigo); }
.bbi-lr-check.is-on svg { opacity: 1; transform: none; }
.bbi-lr-check.is-pressed { transform: scale(0.85); }

.bbi-lr-acct {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-lr-dot { width: 14px; height: 14px; flex: none; border-radius: 5px; background: var(--bbi-grad-brand); }
.bbi-lr-dot--teal { background: linear-gradient(135deg, #2dcecc, #11a7c4); }
.bbi-lr-dot--green { background: var(--bbi-grad-good); }
.bbi-lr-dot--orange { background: linear-gradient(135deg, #fc8453, #fc5f08); }
.bbi-lr-dot--pink { background: linear-gradient(135deg, #ff5fb5, #ff026c); }

.bbi-lr-arr { font-size: 13px; font-weight: 600; color: var(--bbi-muted); font-variant-numeric: tabular-nums; }

.bbi-lr-lock {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #b4bdd0;
  background: var(--bbi-surface-2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.bbi-lr-lock svg { width: 14px; height: 14px; }
.bbi-lr-lock.is-on { background: #fff1db; color: #d97706; box-shadow: inset 0 0 0 1px #ffd28a; }

.bbi-lr-rep {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 9px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.bbi-lr-rep .bbi-avatar { width: 24px; height: 24px; box-shadow: none; }
.bbi-lr-rep b { font-weight: 700; color: var(--bbi-ink); }
.bbi-lr-rep .bbi-lr-chev { margin-left: auto; color: var(--bbi-muted); }
.bbi-lr-rep.is-changed { border-color: #ffd28a; }

.bbi-lr-toast {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: auto 16px 16px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: #fff7e8;
  border: 1px solid #ffe0ad;
}

.bbi-lr-toast__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #fbb04c, #e07a06);
}

.bbi-lr-toast__icon svg { width: 16px; height: 16px; }
.bbi-lr-toast b { display: block; font-size: 14px; font-weight: 800; color: #8a4b04; }
.bbi-lr-toast small { display: block; font-size: 12px; font-weight: 600; color: #b26a14; }

/* Bulk Actions menu */
.bbi-lr-menu { z-index: 12; padding: 6px; }

.bbi-lr-menu__item {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-ink);
}

.bbi-lr-menu__item.is-hover { background: rgba(94, 114, 228, 0.1); color: var(--bbi-indigo); }

/* ---------- Activity Stream ---------- */

.bbi-lr-stream { display: flex; flex-direction: column; }

.bbi-lr-seg {
  display: flex;
  margin: 0 16px 6px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bbi-surface-2);
}

.bbi-lr-seg span {
  flex: 1;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  color: var(--bbi-muted);
}

.bbi-lr-seg .is-on { background: #fff; color: var(--bbi-indigo); box-shadow: var(--bbi-shadow-sm); }

.bbi-lr-msg {
  display: flex;
  gap: 8px;
  margin: 10px 14px 0;
}

.bbi-lr-msg .bbi-avatar { width: 28px; height: 28px; }
.bbi-lr-msg__main { min-width: 0; flex: 1; }
.bbi-lr-msg__who { display: flex; align-items: baseline; gap: 6px; }
.bbi-lr-msg__who b { font-size: 13px; font-weight: 800; color: var(--bbi-ink); }
.bbi-lr-msg__who small { font-size: 11px; font-weight: 600; color: var(--bbi-muted); }

.bbi-lr-msg p {
  margin: 4px 0 0;
  padding: 9px 11px;
  border-radius: 4px 12px 12px 12px;
  background: var(--bbi-surface-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--bbi-ink);
}

.bbi-lr-msg--me p { background: rgba(94, 114, 228, 0.08); }

.bbi-lr-at {
  padding: 0 3px;
  border-radius: 5px;
  background: rgba(94, 114, 228, 0.14);
  font-weight: 800;
  color: var(--bbi-indigo);
}

.bbi-lr-caret {
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--bbi-indigo);
  animation: bbi-lr-blink 0.9s steps(1) infinite;
}

@keyframes bbi-lr-blink { 50% { opacity: 0; } }

.bbi-lr-mk {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-lr-mk__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(94, 114, 228, 0.3);
  font-size: 12px;
  color: var(--bbi-indigo);
  background: #fff;
}

.bbi-lr-mk__btn i {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
}

.bbi-lr-mk__btn i svg { width: 9px; height: 9px; opacity: 0; }

.bbi-lr-compose {
  margin: auto 16px 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--bbi-line);
  font-size: 12px;
  font-weight: 600;
  color: #aab4c8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Assign selected accounts ---------- */

.bbi-lr-scrim {
  z-index: 18;
  border-radius: 28px;
  background: rgba(30, 42, 74, 0.14);
}

.bbi-lr-scrim.bbi-pop-in { animation: bbi-lr-fade 0.35s ease both; }

@keyframes bbi-lr-fade { from { opacity: 0; } to { opacity: 1; } }

.bbi-lr-dlg { z-index: 20; display: flex; flex-direction: column; }

.bbi-lr-dlg__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-lr-dlg__head b { display: block; font-size: 16px; font-weight: 800; color: var(--bbi-ink); }
.bbi-lr-dlg__head small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }
.bbi-lr-dlg__x { margin-left: auto; color: var(--bbi-faint); }
.bbi-lr-dlg__x svg { width: 16px; height: 16px; display: block; }

.bbi-lr-dlg__body { padding: 12px 18px 0; }

.bbi-lr-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-lr-label + .bbi-lr-choice { margin-top: 0; }

.bbi-lr-select {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-bottom: 14px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  border: 1px solid #dfe4f0;
  background: #fff;
  font-size: 13px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.bbi-lr-select > .bbi-lr-chev { margin-left: auto; color: var(--bbi-muted); }
.bbi-lr-select.is-open { border-color: var(--bbi-indigo); box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.15); }
.bbi-lr-select.is-pressed { transform: scale(0.98); }
.bbi-lr-select em { padding-left: 4px; font-style: normal; font-weight: 600; color: #aab4c8; }

.bbi-lr-dest__value { display: flex; align-items: center; gap: 7px; }
.bbi-lr-dest__value .bbi-avatar { width: 26px; height: 26px; box-shadow: none; }
.bbi-lr-dest__value b { font-weight: 800; color: var(--bbi-ink); }
.bbi-lr-dest__value small { font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

.bbi-lr-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--bbi-line);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.15s ease;
}

.bbi-lr-choice b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-lr-choice b svg { width: 13px; height: 13px; color: #d97706; }

.bbi-lr-choice b em {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bbi-surface-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-lr-choice small { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }
.bbi-lr-choice.is-on { border-color: rgba(94, 114, 228, 0.45); background: rgba(94, 114, 228, 0.05); }
.bbi-lr-choice--lock.is-on { border-color: #ffc56b; background: #fffaf0; }
.bbi-lr-choice.is-pressed { transform: scale(0.98); }

.bbi-lr-radio {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #cfd6ea;
  background: #fff;
  transition: border-color 0.25s ease;
}

.bbi-lr-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bbi-indigo);
  transform: scale(0);
  transition: transform 0.3s var(--bbi-spring);
}

.bbi-lr-choice.is-on .bbi-lr-radio { border-color: var(--bbi-indigo); }
.bbi-lr-choice.is-on .bbi-lr-radio::after { transform: scale(1); }
.bbi-lr-choice--lock.is-on .bbi-lr-radio { border-color: #d97706; }
.bbi-lr-choice--lock.is-on .bbi-lr-radio::after { background: #d97706; }

.bbi-lr-until {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.35s ease, filter 0.35s ease, background-color 0.35s ease;
}

.bbi-lr-until.is-on { opacity: 1; filter: none; background: #fff7e8; }

.bbi-lr-until__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bbi-lr-until__top b { font-size: 12px; font-weight: 800; color: var(--bbi-ink); }

.bbi-lr-until__top em {
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #ffd28a;
  background: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: #b45309;
}

.bbi-lr-until__seg { display: flex; gap: 6px; }

.bbi-lr-until__seg span {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e3e7f1;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  color: var(--bbi-muted);
}

.bbi-lr-until__seg .is-on { border-color: transparent; background: var(--bbi-grad-brand); color: #fff; }

.bbi-lr-dlg__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 12px 18px 16px;
}

.bbi-lr-cancel { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--bbi-muted); }
.bbi-lr-go { height: 40px; padding: 0 16px; font-size: 14px; gap: 8px; }
.bbi-lr-go svg { width: 15px; height: 15px; }

/* Territory options */
.bbi-lr-opts { z-index: 22; padding: 6px; }

.bbi-lr-opts__group {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-lr-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 6px;
  border-radius: 9px;
  font-size: 13px;
}

.bbi-lr-opt .bbi-avatar { width: 26px; height: 26px; box-shadow: none; }
.bbi-lr-opt b { font-weight: 700; color: var(--bbi-ink); }
.bbi-lr-opt small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }
.bbi-lr-opt.is-hover { background: rgba(94, 114, 228, 0.1); }
