/* Bulk assign: tick accounts, Bulk Assign with "Assign and lock", BoogieBoard stays on target */

.bbi-ba-static,
.bbi-ba-static * { transition: none !important; }

/* ---------- Checkbox ---------- */

.bbi-ba-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  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-ba-check svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.4); transition: opacity 0.2s ease, transform 0.3s var(--bbi-spring); }
.bbi-ba-check i { position: absolute; width: 10px; height: 2.5px; border-radius: 2px; background: #fff; opacity: 0; }
.bbi-ba-check.is-on,
.bbi-ba-check.is-some { background: var(--bbi-indigo); border-color: var(--bbi-indigo); }
.bbi-ba-check.is-on svg { opacity: 1; transform: none; }
.bbi-ba-check.is-some i { opacity: 1; }
.bbi-ba-check.is-pressed { transform: scale(0.82); }

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

.bbi-ba-list .bbi-card__head { white-space: nowrap; }
.bbi-ba-after { margin-left: auto; }

.bbi-ba-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  margin: 0 14px;
  padding: 0 7px 0 13px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.bbi-ba-bar.is-active {
  background: rgba(94, 114, 228, 0.07);
  box-shadow: inset 0 0 0 1px rgba(94, 114, 228, 0.22);
}

.bbi-ba-bar__label { font-size: 14px; font-weight: 700; color: var(--bbi-muted); white-space: nowrap; }

.bbi-ba-bar__label b {
  display: inline-block;
  color: var(--bbi-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bbi-ba-bulk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin-left: auto;
  padding: 0 11px 0 13px;
  border-radius: 9px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-muted);
  white-space: nowrap;
  opacity: 0.7;
  transition: transform 0.2s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, opacity 0.3s ease;
}

.bbi-ba-bulk svg { width: 14px; height: 14px; }

.bbi-ba-bulk.is-ready {
  opacity: 1;
  border-color: transparent;
  background: var(--bbi-grad-brand);
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(94, 114, 228, 0.7);
}

.bbi-ba-bulk.is-pressed { transform: scale(0.95); }

.bbi-ba-th,
.bbi-ba-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 140px 46px;
  align-items: center;
  column-gap: 10px;
  padding: 0 12px 0 13px;
}

.bbi-ba-th {
  height: 34px;
  margin: 6px 14px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-ba-th span:first-child { grid-column: 1 / 3; }
.bbi-ba-th span:last-child { text-align: right; }

.bbi-ba-rows {
  margin: 0 14px;
  border-top: 1px solid var(--bbi-line);
}

.bbi-ba-row {
  position: relative;
  height: 50px;
  border-bottom: 1px solid var(--bbi-line);
  transition: background-color 0.35s ease;
}

.bbi-ba-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  transition: background-color 0.35s ease;
}

.bbi-ba-row.is-selected { background: rgba(94, 114, 228, 0.06); }
.bbi-ba-row.is-selected::before { background: var(--bbi-indigo); }
.bbi-ba-row.is-locked { background: #fffaf0; }
.bbi-ba-row.is-locked::before { background: #f59f00; }

.bbi-ba-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  color: var(--bbi-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bbi-ba-terr {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bbi-ba-terr .bbi-avatar { width: 28px; height: 28px; box-shadow: 0 0 0 2px #fff; }

.bbi-ba-terr__txt {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
}

.bbi-ba-terr__txt b { display: block; font-size: 13px; font-weight: 800; color: var(--bbi-ink); }
.bbi-ba-terr__txt small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

.bbi-ba-lock {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  background: #fff1db;
  color: #d97706;
  box-shadow: inset 0 0 0 1px #ffd28a;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.2s ease, transform 0.45s var(--bbi-spring);
}

.bbi-ba-lock svg { width: 13px; height: 13px; }
.bbi-ba-row.is-locked .bbi-ba-lock { opacity: 1; transform: none; }

.bbi-ba-arr {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-ink);
  font-variant-numeric: tabular-nums;
}

.bbi-ba-more {
  padding: 13px 27px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-muted);
}

/* ---------- Bulk actions menu ---------- */

.bbi-ba-menu {
  z-index: 20;
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--bbi-shadow-lg);
}

.bbi-ba-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.bbi-ba-menu__item b { display: block; font-size: 13px; font-weight: 800; color: var(--bbi-ink); }
.bbi-ba-menu__item small { display: block; margin-top: 1px; font-size: 11px; font-weight: 600; color: var(--bbi-muted); }

.bbi-ba-menu__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--bbi-indigo);
}

.bbi-ba-menu__icon svg { width: 15px; height: 15px; }
.bbi-ba-menu__item.is-hover { background: rgba(94, 114, 228, 0.08); }
.bbi-ba-menu__item.is-hover .bbi-ba-menu__icon { background: var(--bbi-grad-brand); color: #fff; }

/* ---------- Toast ---------- */

.bbi-ba-toast {
  z-index: 12;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 10px;
  border-color: var(--bbi-good-edge);
  box-shadow: var(--bbi-shadow-lg);
}

.bbi-ba-toast .bbi-toast__icon { width: 36px; height: 36px; flex: none; border-radius: 10px; }
.bbi-ba-toast .bbi-toast__icon svg { width: 18px; height: 18px; }
.bbi-ba-toast__txt { min-width: 0; white-space: nowrap; }
.bbi-ba-toast .bbi-toast__title { display: block; font-size: 14px; font-weight: 800; line-height: 1.3; }
.bbi-ba-toast .bbi-toast__text { display: block; }

.bbi-ba-undo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  margin-left: auto;
  padding: 0 10px;
  flex: none;
  border-radius: 8px;
  border: 1px solid rgba(94, 114, 228, 0.35);
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-indigo);
}

.bbi-ba-undo svg { width: 13px; height: 13px; }

/* ---------- Auto-Balance summary (sits under the dialog) ---------- */

.bbi-ba-run { transition: opacity 0.3s ease, transform 0.4s var(--bbi-ease); }
.bbi-ba-run.is-gone { opacity: 0; transform: scale(0.97); }
.bbi-ba-run .bbi-card__head { white-space: nowrap; }
.bbi-ba-run__tag { margin-left: auto; }

.bbi-ba-run__score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 16px 0;
  padding: 18px 12px;
  border-radius: 14px;
  background: var(--bbi-surface-2);
}

.bbi-ba-run__score .bbi-ring {
  --bbi-ring-value: 100;
  --bbi-ring-color: var(--bbi-good);
  width: 72px;
  height: 72px;
}

.bbi-ba-run__score .bbi-ring::after { inset: 8px; }
.bbi-ba-run__score .bbi-ring__value { font-size: 19px; color: var(--bbi-good); }
.bbi-ba-run__score b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-ink); }
.bbi-ba-run__score small { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--bbi-muted); }

.bbi-ba-run__hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 16px 0;
  padding: 18px 14px;
  border-radius: 14px;
  border: 2px dashed rgba(94, 114, 228, 0.35);
  background: rgba(94, 114, 228, 0.04);
}

.bbi-ba-run__hint > svg { width: 22px; height: 22px; flex: none; color: var(--bbi-indigo); transform: rotate(180deg); }
.bbi-ba-run__hint b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-indigo); }
.bbi-ba-run__hint small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

/* ---------- Assign accounts dialog ---------- */

.bbi-ba-dlg { z-index: 6; }
.bbi-ba-dlg .bbi-card__head { padding: 14px 16px 12px; white-space: nowrap; }
.bbi-ba-dlg__body { padding: 0 16px; }

.bbi-ba-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-ba-dd {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 12px;
  border-radius: 10px;
  border: 1px solid #dfe3f0;
  background: #fff;
  color: var(--bbi-muted);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.bbi-ba-dd > svg { width: 14px; height: 14px; flex: none; margin-left: auto; }
.bbi-ba-dd.is-pressed { transform: scale(0.98); }
.bbi-ba-dd.is-open,
.bbi-ba-dd.is-set { border-color: rgba(94, 114, 228, 0.55); box-shadow: 0 0 0 3px rgba(94, 114, 228, 0.12); }

.bbi-ba-dd__val {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.bbi-ba-dd__val .bbi-avatar { width: 24px; height: 24px; box-shadow: none; }
.bbi-ba-dd__val b { font-size: 14px; font-weight: 800; color: var(--bbi-ink); }
.bbi-ba-dd__owner { font-weight: 700; color: var(--bbi-muted); }

.bbi-ba-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid #dfe3f0;
  background: #fff;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.bbi-ba-dd + .bbi-ba-opt { margin-top: 12px; }
.bbi-ba-opt.is-pressed { transform: scale(0.98); }

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

.bbi-ba-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-ba-opt.is-on .bbi-ba-radio { border-color: var(--bbi-indigo); }
.bbi-ba-opt.is-on .bbi-ba-radio::after { transform: none; }

.bbi-ba-opt.is-on {
  border-color: rgba(94, 114, 228, 0.5);
  background: #f3f4ff;
  box-shadow: inset 3px 0 var(--bbi-indigo);
}

.bbi-ba-opt__txt { min-width: 0; line-height: 1.3; white-space: nowrap; }

.bbi-ba-opt__txt b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-ba-opt__txt b svg { width: 13px; height: 13px; color: #d97706; }
.bbi-ba-opt__txt small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

/* Locks are amber everywhere in the illustrations. */
.bbi-ba-opt--lock.is-on {
  border-color: #f7c46c;
  background: #fff8ec;
  box-shadow: inset 3px 0 #f59f00;
}

.bbi-ba-opt--lock.is-on .bbi-ba-radio { border-color: #f59f00; }
.bbi-ba-opt--lock .bbi-ba-radio::after { background: #f59f00; }
.bbi-ba-opt--lock.is-on .bbi-ba-opt__txt small { color: #b45309; }

.bbi-ba-go {
  width: 100%;
  justify-content: center;
  gap: 8px;
  height: 42px;
  margin-top: 12px;
  padding: 0 14px;
  font-size: 14px;
  opacity: 0.55;
  transition: transform 0.2s var(--bbi-ease), box-shadow 0.2s ease, opacity 0.3s ease;
}

.bbi-ba-go svg { width: 16px; height: 16px; flex: none; }
.bbi-ba-go.is-ready { opacity: 1; }

.bbi-ba-go.is-busy {
  background-image: linear-gradient(100deg, var(--bbi-indigo) 0%, var(--bbi-purple) 40%, #b8c2ff 50%,
    var(--bbi-purple) 60%, var(--bbi-indigo) 100%);
  background-size: 250% 100%;
}

.bbi-ba-go.is-success {
  opacity: 1;
  background: var(--bbi-grad-good);
  box-shadow: 0 12px 24px -8px rgba(26, 174, 111, 0.5);
}

.bbi-ba-ddlist {
  z-index: 22;
  padding: 6px;
  border-radius: 12px;
  box-shadow: var(--bbi-shadow-lg);
}

.bbi-ba-ddopt {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

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

/* ---------- BoogieBoard ---------- */

.bbi-ba-board { transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.bbi-ba-board .bbi-card__head { gap: 8px; padding: 14px 14px 8px 16px; white-space: nowrap; }
.bbi-ba-board.is-live { border-color: rgba(94, 114, 228, 0.4); box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.1), var(--bbi-shadow); }
.bbi-ba-pill { margin-left: auto; height: 26px; padding: 0 9px; }
.bbi-ba-pill.is-busy { background: rgba(94, 114, 228, 0.1); color: var(--bbi-indigo); }
.bbi-ba-pill.is-busy svg { animation: bbi-spin 0.9s linear infinite; }

.bbi-ba-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 72px;
  gap: 6px 8px;
  padding: 0 16px;
}

.bbi-ba-grid .bbi-pivot__head { height: 20px; letter-spacing: 0.05em; }
.bbi-ba-grid .bbi-pivot__head:nth-child(n + 2) { justify-content: center; }
.bbi-ba-grid .bbi-territory { height: 36px; gap: 9px; }
.bbi-ba-grid .bbi-territory .bbi-avatar { width: 28px; height: 28px; box-shadow: 0 0 0 2px #fff; }
.bbi-ba-grid .bbi-territory__name { font-size: 14px; }

.bbi-ba-grid .bbi-cell {
  justify-content: center;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

.bbi-ba-grid .bbi-cell .bbi-ba-delta {
  display: none;
  margin-left: 5px;
  font-size: 11px;
  font-weight: 800;
}

.bbi-ba-grid .bbi-cell .bbi-ba-delta.is-on { display: inline-block; animation: bbi-pop-in 0.5s var(--bbi-spring) both; }
