/* =============================================================
 * revolv® Shell — BoomTown Modernization (v1.45.45)
 *
 * Phase 1 of the BoomTown-style refresh. CSS-only override that
 * transforms the existing dark-navy sidebar into a modern light
 * sidebar with the brand accent treatment. No markup or JS changes.
 *
 * Gated under .revolv-shell--bt body class — flip the gate off
 * via the `revolv_crm_shell_bt_enabled` filter to revert instantly.
 *
 * Loads AFTER dashboard.css so its rules win on equal specificity.
 * Consumes Phase 0 design tokens (--rd-bg-*, --rd-text-*, --rd-accent,
 * etc.) so any future palette tweak ripples globally.
 * ============================================================= */

.revolv-shell--bt .rd { background: var(--rd-bg-canvas); }

/* ─── Sidebar surface ─────────────────────────────────────── */
.revolv-shell--bt .rd-sidebar {
  background: var(--rd-bg-surface);
  border-right: 1px solid var(--rd-border-default);
  padding: var(--rd-space-5) var(--rd-space-3);
  box-shadow: var(--rd-shadow-xs);
}

/* ─── Brand mark ───────────────────────────────────────────── */
.revolv-shell--bt .rd-sidebar-brand { padding: 0 var(--rd-space-2) var(--rd-space-6); }
.revolv-shell--bt .rd-brand-mark {
  background: linear-gradient(135deg, var(--rd-accent), var(--rd-accent-hover));
  color: var(--rd-text-on-accent);
  border-radius: var(--rd-radius-md);
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.25);
}
.revolv-shell--bt .rd-brand-text { color: var(--rd-text-primary); font-weight: var(--rd-font-extrabold); }
.revolv-shell--bt .rd-brand-dim  { color: var(--rd-text-muted); font-weight: var(--rd-font-normal); }

/* ─── Agent card (top of sidebar) ─────────────────────────── */
.revolv-shell--bt .rd-agent-card {
  background: var(--rd-bg-subtle);
  border: 1px solid var(--rd-border-subtle);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-3);
  margin-bottom: var(--rd-space-5);
  transition: border-color var(--rd-trans-default);
}
.revolv-shell--bt .rd-agent-card:hover { border-color: var(--rd-border-strong); }
.revolv-shell--bt .rd-avatar { border-color: var(--rd-bg-surface); box-shadow: 0 0 0 1px var(--rd-border-default); }
.revolv-shell--bt .rd-agent-info strong { color: var(--rd-text-primary); }
.revolv-shell--bt .rd-agent-role { color: var(--rd-text-muted); font-weight: var(--rd-font-medium); }

/* ─── Nav items ───────────────────────────────────────────── */
.revolv-shell--bt .rd-nav { gap: var(--rd-space-1); }
.revolv-shell--bt .rd-nav-item {
  position: relative;
  background: transparent;
  color: var(--rd-text-secondary);
  font-weight: var(--rd-font-medium);
  font-size: var(--rd-text-sm);
  padding: var(--rd-space-3) var(--rd-space-3) var(--rd-space-3) var(--rd-space-4);
  border-radius: var(--rd-radius-md);
  border: 0;
  display: flex;
  align-items: center;
  gap: var(--rd-space-3);
  cursor: pointer;
  transition: background var(--rd-dur-fast) var(--rd-ease-snap),
              color var(--rd-dur-fast) var(--rd-ease-snap);
  text-align: left;
  width: 100%;
}
.revolv-shell--bt .rd-nav-item svg {
  width: 18px; height: 18px;
  color: var(--rd-text-subtle);
  transition: color var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-nav-item:hover {
  background: var(--rd-bg-subtle);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-nav-item:hover svg { color: var(--rd-text-secondary); }
.revolv-shell--bt .rd-nav-item:focus-visible {
  outline: var(--rd-focus-outline);
  outline-offset: var(--rd-focus-offset);
}

/* ─── Active state — BoomTown signature ──────────────────── */
.revolv-shell--bt .rd-nav-item.active {
  background: var(--rd-accent-soft);
  color: var(--rd-accent-deep);
  font-weight: var(--rd-font-semibold);
}
.revolv-shell--bt .rd-nav-item.active svg { color: var(--rd-accent); }
.revolv-shell--bt .rd-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: var(--rd-space-2); bottom: var(--rd-space-2);
  width: 3px;
  background: var(--rd-accent);
  border-radius: 0 var(--rd-radius-xs) var(--rd-radius-xs) 0;
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.35);
}

/* ─── Badge counter on nav items ─────────────────────────── */
.revolv-shell--bt .rd-badge-count {
  background: var(--rd-accent);
  color: var(--rd-text-on-accent);
  font-weight: var(--rd-font-bold);
  border-radius: var(--rd-radius-pill);
  padding: 2px 7px;
  min-width: 18px;
  font-size: var(--rd-text-xs);
  box-shadow: 0 1px 2px rgba(255, 107, 53, 0.25);
}
.revolv-shell--bt .rd-nav-item.active .rd-badge-count {
  background: var(--rd-bg-surface);
  color: var(--rd-accent);
  box-shadow: 0 0 0 1px var(--rd-accent-subtle);
}

/* ─── Sidebar footer ─────────────────────────────────────── */
.revolv-shell--bt .rd-sidebar-footer {
  border-top: 1px solid var(--rd-border-default);
  padding-top: var(--rd-space-4);
  margin-top: var(--rd-space-4);
}
.revolv-shell--bt .rd-nav-link-small { color: var(--rd-text-muted); font-size: var(--rd-text-xs); }
.revolv-shell--bt .rd-nav-link-small:hover { color: var(--rd-accent); }

/* ─── Mobile topbar (hamburger area) ─────────────────────── */
.revolv-shell--bt .rd-topbar {
  background: var(--rd-bg-surface);
  border-bottom: 1px solid var(--rd-border-default);
  box-shadow: var(--rd-shadow-xs);
}

/* ─── Main content area gets a softer canvas ─────────────── */
.revolv-shell--bt .rd-main { background: var(--rd-bg-canvas); }

/* ─── Mobile sidebar (when .open) keeps light surface ────── */
@media (max-width: 768px) {
  .revolv-shell--bt .rd-sidebar {
    box-shadow: var(--rd-shadow-lg);
    border-right: 0;
  }
  .revolv-shell--bt .rd-overlay {
    background: rgba(15, 23, 42, 0.45);
  }
}

/* ─── Reduced motion respect (inherits transitions only) ─── */
@media (prefers-reduced-motion: reduce) {
  .revolv-shell--bt .rd-nav-item,
  .revolv-shell--bt .rd-agent-card,
  .revolv-shell--bt .rd-nav-item svg { transition: none; }
}

/* =============================================================
 * PHASE 2 — Inbox card-density refresh (v1.45.46)
 *
 * Re-skins the existing leads inbox: pending queue cards get
 * BoomTown polish; the dense "My book" table is reflowed into a
 * card grid using CSS-only display tricks (no markup change).
 * ============================================================= */

/* ─── Pending-queue cards (already cards, just polish) ────── */
.revolv-shell--bt .rd-leads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--rd-space-4);
}
.revolv-shell--bt .rd-lead-card {
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-5);
  box-shadow: var(--rd-shadow-xs);
  transition: box-shadow var(--rd-trans-default), border-color var(--rd-trans-default), transform var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-lead-card:hover {
  border-color: var(--rd-accent-subtle);
  box-shadow: var(--rd-shadow-md);
  transform: translateY(-1px);
}
.revolv-shell--bt .rd-lead-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--rd-space-3);
}
.revolv-shell--bt .rd-lead-type {
  display: inline-flex; align-items: center;
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-extrabold);
  text-transform: uppercase; letter-spacing: var(--rd-letter-eyebrow);
  padding: var(--rd-space-1) var(--rd-space-3);
  border-radius: var(--rd-radius-pill); line-height: 1;
  background: var(--rd-accent-soft); color: var(--rd-accent-deep);
}
.revolv-shell--bt .rd-countdown {
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold);
  color: var(--rd-warning); font-variant-numeric: tabular-nums;
  padding: var(--rd-space-1) var(--rd-space-2); background: var(--rd-warning-soft); border-radius: var(--rd-radius-sm);
}
.revolv-shell--bt .rd-lead-card h3 {
  font-size: var(--rd-text-md); font-weight: var(--rd-font-bold);
  color: var(--rd-text-primary); margin: 0 0 var(--rd-space-1); line-height: var(--rd-leading-snug);
}
.revolv-shell--bt .rd-lead-mls {
  font-size: var(--rd-text-xs); color: var(--rd-text-muted);
  font-variant-numeric: tabular-nums; margin-bottom: var(--rd-space-2);
}
.revolv-shell--bt .rd-lead-msg {
  font-size: var(--rd-text-sm); color: var(--rd-text-secondary);
  font-style: italic; margin: var(--rd-space-2) 0 var(--rd-space-3);
  line-height: var(--rd-leading-normal);
  padding: var(--rd-space-3); background: var(--rd-bg-subtle);
  border-radius: var(--rd-radius-sm); border-left: 2px solid var(--rd-border-strong);
}
.revolv-shell--bt .rd-lead-meta {
  display: flex; flex-direction: column; gap: var(--rd-space-1);
  font-size: var(--rd-text-xs); color: var(--rd-text-muted);
  margin-bottom: var(--rd-space-3);
}
.revolv-shell--bt .rd-lead-meta strong { color: var(--rd-text-primary); font-weight: var(--rd-font-semibold); }
.revolv-shell--bt .rd-lead-locked {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  font-size: var(--rd-text-xs); color: var(--rd-text-muted);
  margin-bottom: var(--rd-space-3);
  padding: var(--rd-space-2) var(--rd-space-3); background: var(--rd-bg-subtle);
  border-radius: var(--rd-radius-sm);
}
.revolv-shell--bt .rd-btn-full {
  width: 100%; display: inline-flex; align-items: center; justify-content: center;
  padding: var(--rd-space-3) var(--rd-space-4);
  background: var(--rd-accent); color: var(--rd-text-on-accent);
  border: 0; border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold); cursor: pointer;
  box-shadow: 0 1px 2px rgba(255, 107, 53, 0.20);
  transition: background var(--rd-dur-fast) var(--rd-ease-snap),
              transform var(--rd-dur-fast) var(--rd-ease-snap),
              box-shadow var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-btn-full:hover {
  background: var(--rd-accent-hover);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.30);
  transform: translateY(-1px);
}
.revolv-shell--bt .rd-btn-full:active { transform: translateY(0); }

/* ─── Sub-headings ("Pending queue", "My book") ──────────── */
.revolv-shell--bt .rd-subhead {
  font-size: var(--rd-text-md); font-weight: var(--rd-font-bold);
  color: var(--rd-text-primary); margin: var(--rd-space-6) 0 var(--rd-space-3);
  display: flex; align-items: center; gap: var(--rd-space-2);
}
.revolv-shell--bt .rd-subhead-spaced { margin-top: var(--rd-space-10); }
.revolv-shell--bt .rd-subhead-count {
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-bold);
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
  padding: var(--rd-space-1) var(--rd-space-2); border-radius: var(--rd-radius-pill);
  min-width: 20px; text-align: center; line-height: 1;
}

/* ─── My-book filter bar (pill chips) ────────────────────── */
.revolv-shell--bt .rd-ltbl-filters {
  display: flex; flex-direction: column; gap: var(--rd-space-3);
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-4);
  margin-bottom: var(--rd-space-4);
}
.revolv-shell--bt .rd-ltbl-search {
  display: flex; align-items: center; gap: var(--rd-space-2);
  background: var(--rd-bg-subtle);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-md);
  padding: var(--rd-space-2) var(--rd-space-3);
  transition: border-color var(--rd-dur-fast) var(--rd-ease-snap),
              box-shadow var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ltbl-search:focus-within {
  background: var(--rd-bg-surface);
  border-color: var(--rd-border-focus);
  box-shadow: var(--rd-shadow-focus);
}
.revolv-shell--bt .rd-ltbl-search svg { color: var(--rd-text-subtle); flex-shrink: 0; }
.revolv-shell--bt .rd-ltbl-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font: inherit; font-size: var(--rd-text-sm); color: var(--rd-text-primary);
  padding: var(--rd-space-1) 0;
}
.revolv-shell--bt .rd-ltbl-search input::placeholder { color: var(--rd-text-subtle); }

.revolv-shell--bt .rd-ltbl-chiprow {
  display: flex; flex-wrap: wrap; gap: var(--rd-space-1);
}
.revolv-shell--bt .rd-ltbl-chip {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: var(--rd-space-1) var(--rd-space-3);
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
  border: 1px solid transparent; border-radius: var(--rd-radius-pill);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-semibold);
  cursor: pointer; line-height: 1.4;
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ltbl-chip:hover {
  background: var(--rd-bg-surface);
  border-color: var(--rd-border-strong);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-ltbl-chip.active {
  background: var(--rd-accent-soft);
  color: var(--rd-accent-deep);
  border-color: var(--rd-accent-subtle);
}
.revolv-shell--bt .rd-ltbl-chipct {
  background: rgba(15, 23, 42, 0.06);
  color: inherit; opacity: 0.85;
  padding: 1px 6px; border-radius: var(--rd-radius-pill);
  font-size: 10px; font-weight: var(--rd-font-bold);
  font-variant-numeric: tabular-nums;
}
.revolv-shell--bt .rd-ltbl-chip.active .rd-ltbl-chipct {
  background: var(--rd-bg-surface);
  color: var(--rd-accent);
}
.revolv-shell--bt .rd-ltbl-chip-online .rd-ltbl-online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rd-success); box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.18);
  display: inline-block;
}

/* ─── My-book table → card grid (CSS-only re-flow) ────────── */
.revolv-shell--bt .rd-ltbl-tablewrap { overflow: visible; background: transparent; border: 0; padding: 0; }
.revolv-shell--bt .rd-ltbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.revolv-shell--bt .rd-ltbl thead { display: none; }
.revolv-shell--bt .rd-ltbl tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--rd-space-4);
}

.revolv-shell--bt .rd-ltbl tr {
  display: grid;
  grid-template-areas:
    "lead     score"
    "contact  contact"
    "stage    time"
    "tags     tags"
    "property property"
    "source   source";
  grid-template-columns: 1fr auto;
  gap: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-4);
  cursor: pointer;
  transition: border-color var(--rd-trans-default),
              box-shadow var(--rd-trans-default),
              transform var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ltbl tr:hover {
  border-color: var(--rd-accent-subtle);
  box-shadow: var(--rd-shadow-md);
  transform: translateY(-1px);
}
.revolv-shell--bt .rd-ltbl tr.is-online {
  border-left: 3px solid var(--rd-success);
  padding-left: calc(var(--rd-space-4) - 3px);
}

/* Each <td> becomes a card region. Reset table-cell semantics. */
.revolv-shell--bt .rd-ltbl td {
  display: block; padding: 0; border: 0;
  font-size: var(--rd-text-sm); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rd-ltbl td:nth-child(1) { grid-area: lead; }
.revolv-shell--bt .rd-ltbl td:nth-child(2) { grid-area: contact; }
.revolv-shell--bt .rd-ltbl td:nth-child(3) { grid-area: stage; }
.revolv-shell--bt .rd-ltbl td:nth-child(4) { grid-area: score; justify-self: end; }
.revolv-shell--bt .rd-ltbl td:nth-child(5) { grid-area: tags; }
.revolv-shell--bt .rd-ltbl td:nth-child(6) { grid-area: property; }
.revolv-shell--bt .rd-ltbl td:nth-child(7) { grid-area: source; }
.revolv-shell--bt .rd-ltbl td:nth-child(8) { grid-area: time; justify-self: end; font-size: var(--rd-text-xs); color: var(--rd-text-muted); }

/* Lead identity (avatar + name + id) */
.revolv-shell--bt .rd-ltbl-lead { display: flex; align-items: center; gap: var(--rd-space-3); }
.revolv-shell--bt .rd-ltbl-avatar {
  width: 36px; height: 36px; border-radius: var(--rd-radius-circle);
  background: linear-gradient(135deg, var(--rd-accent), var(--rd-accent-hover));
  color: var(--rd-text-on-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-extrabold);
  flex-shrink: 0; box-shadow: 0 1px 2px rgba(255, 107, 53, 0.20);
}
.revolv-shell--bt .rd-ltbl-lead strong {
  display: block; font-size: var(--rd-text-base); font-weight: var(--rd-font-bold);
  color: var(--rd-text-primary); line-height: var(--rd-leading-snug);
}
.revolv-shell--bt .rd-ltbl-sub {
  font-size: var(--rd-text-xs); color: var(--rd-text-subtle);
  font-variant-numeric: tabular-nums;
}

/* Stage chip */
.revolv-shell--bt .rd-ltbl-stage {
  display: inline-flex; padding: var(--rd-space-1) var(--rd-space-2);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-bold);
  text-transform: uppercase; letter-spacing: var(--rd-letter-wide);
  border-radius: var(--rd-radius-sm); line-height: 1;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rd-ltbl-stage-new           { background: var(--rd-info-soft);    color: var(--rd-info); }
.revolv-shell--bt .rd-ltbl-stage-contacted     { background: var(--rd-warning-soft); color: var(--rd-warning); }
.revolv-shell--bt .rd-ltbl-stage-listing,
.revolv-shell--bt .rd-ltbl-stage-showing,
.revolv-shell--bt .rd-ltbl-stage-under_contract{ background: var(--rd-accent-soft);  color: var(--rd-accent-deep); }
.revolv-shell--bt .rd-ltbl-stage-closed_won    { background: var(--rd-success-soft); color: var(--rd-success); }
.revolv-shell--bt .rd-ltbl-stage-closed_lost   { background: var(--rd-bg-muted);     color: var(--rd-text-muted); }

/* Score chip — heat scale (predictive scoring polish) */
.revolv-shell--bt .rd-ltbl-score {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: var(--rd-space-1) var(--rd-space-2);
  border-radius: var(--rd-radius-pill); line-height: 1;
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold);
  font-variant-numeric: tabular-nums;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rd-ltbl-score-hot  { background: var(--rd-heat-fire-soft); color: var(--rd-heat-fire); }
.revolv-shell--bt .rd-ltbl-score-warm { background: var(--rd-heat-warm-soft); color: var(--rd-heat-warm); }
.revolv-shell--bt .rd-ltbl-score-cold { background: var(--rd-heat-cool-soft); color: var(--rd-heat-cool); }

/* Contact info (multi-line) */
.revolv-shell--bt .rd-ltbl-contact {
  font-size: var(--rd-text-xs); color: var(--rd-text-secondary);
  line-height: var(--rd-leading-snug);
  padding: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-bg-subtle); border-radius: var(--rd-radius-sm);
}
.revolv-shell--bt .rd-ltbl-muted { color: var(--rd-text-subtle); }

/* Source line */
.revolv-shell--bt .rd-ltbl-source {
  font-size: var(--rd-text-xs); color: var(--rd-text-muted);
  border-top: 1px dashed var(--rd-border-default);
  padding-top: var(--rd-space-2);
}

/* Tags row */
.revolv-shell--bt .rd-ltbl-tagcell { display: flex; flex-wrap: wrap; gap: 4px; }

/* Loading / empty rows — full-width card */
.revolv-shell--bt .rd-ltbl tbody tr:has(.rd-ltbl-loading) {
  grid-column: 1 / -1;
  display: block;
  padding: var(--rd-space-8);
  text-align: center;
  background: var(--rd-bg-surface);
  border: 1px dashed var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  color: var(--rd-text-muted);
  cursor: default;
}
.revolv-shell--bt .rd-ltbl tbody tr:has(.rd-ltbl-loading):hover {
  border-color: var(--rd-border-default);
  box-shadow: none;
  transform: none;
}
.revolv-shell--bt .rd-ltbl-loading { display: block; padding: 0; }

/* My-book footer pagination */
.revolv-shell--bt .rd-ltbl-footer {
  display: flex; align-items: center; justify-content: center; gap: var(--rd-space-4);
  margin-top: var(--rd-space-5); padding: var(--rd-space-3) 0;
  border-top: 1px solid var(--rd-border-default);
  font-size: var(--rd-text-sm); color: var(--rd-text-muted);
}
.revolv-shell--bt .rd-link-btn {
  background: var(--rd-bg-surface); border: 1px solid var(--rd-border-default);
  color: var(--rd-text-secondary);
  padding: var(--rd-space-2) var(--rd-space-3); border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-semibold); cursor: pointer;
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-link-btn:hover:not(:disabled) {
  background: var(--rd-accent-soft); border-color: var(--rd-accent-subtle); color: var(--rd-accent-deep);
}
.revolv-shell--bt .rd-link-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mobile — stack cards in single column */
@media (max-width: 640px) {
  .revolv-shell--bt .rd-leads-grid,
  .revolv-shell--bt .rd-ltbl tbody { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .revolv-shell--bt .rd-lead-card,
  .revolv-shell--bt .rd-ltbl tr,
  .revolv-shell--bt .rd-btn-full,
  .revolv-shell--bt .rd-link-btn,
  .revolv-shell--bt .rd-ltbl-chip { transition: none; transform: none !important; }
}

/* =============================================================
 * PHASE 3 — Persistent lead card + action bar (v1.45.47)
 *
 * Lead-detail page sticks the contact card + action bar to the
 * top of the viewport so they stay visible while the activity
 * feed scrolls beneath. Re-skins the action buttons with the
 * accent system so they read as a unified action bar (vs the
 * older multicolor 7-button cluster).
 * ============================================================= */

/* ─── Sticky topbar (back + stage badge + score chip) ────── */
.revolv-shell--bt .rd-ld-topbar {
  position: sticky;
  top: 0;
  z-index: var(--rd-z-sticky);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rd-border-default);
  padding: var(--rd-space-3) var(--rd-space-4);
  margin: calc(var(--rd-space-6) * -1) calc(var(--rd-space-6) * -1) 0;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--rd-shadow-xs);
}
.revolv-shell--bt .rd-ld-back {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  background: transparent; border: 1px solid var(--rd-border-default);
  color: var(--rd-text-secondary);
  padding: var(--rd-space-2) var(--rd-space-3);
  border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-semibold);
  cursor: pointer; transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-back:hover {
  background: var(--rd-bg-subtle);
  border-color: var(--rd-border-strong);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-ld-topbar-right { display: flex; align-items: center; gap: var(--rd-space-2); }

/* Stage badge (header right side) — share semantic colors */
.revolv-shell--bt .rd-ld-stage-badge {
  display: inline-flex; align-items: center;
  padding: var(--rd-space-1) var(--rd-space-3);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-bold);
  text-transform: uppercase; letter-spacing: var(--rd-letter-wide);
  border-radius: var(--rd-radius-pill); line-height: 1;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}

/* Score chip — heat scale */
.revolv-shell--bt .rd-ld-score {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: var(--rd-space-1) var(--rd-space-3);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold);
  border-radius: var(--rd-radius-pill); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rd-ld-score-hot  { background: var(--rd-heat-fire-soft); color: var(--rd-heat-fire); }
.revolv-shell--bt .rd-ld-score-warm { background: var(--rd-heat-warm-soft); color: var(--rd-heat-warm); }
.revolv-shell--bt .rd-ld-score-cold { background: var(--rd-heat-cool-soft); color: var(--rd-heat-cool); }

/* ─── Sticky lead-header card (sits below topbar) ────────── */
.revolv-shell--bt .rd-ld-header {
  position: sticky;
  top: 60px;             /* leaves room for sticky topbar */
  z-index: calc(var(--rd-z-sticky) - 1);
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-5);
  margin-top: var(--rd-space-3);
  margin-bottom: var(--rd-space-4);
  box-shadow: var(--rd-shadow-sm);
  display: flex; align-items: center; gap: var(--rd-space-4);
  flex-wrap: wrap;
}

/* Avatar — orange brand gradient (matches inbox card avatars) */
.revolv-shell--bt .rd-ld-avatar {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--rd-accent), var(--rd-accent-hover));
  color: var(--rd-text-on-accent);
  border-radius: var(--rd-radius-circle);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--rd-text-xl); font-weight: var(--rd-font-extrabold);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.25);
}

/* Contact block (name + email/phone) */
.revolv-shell--bt .rd-ld-contact { flex: 1; min-width: 220px; }
.revolv-shell--bt .rd-ld-contact h1 {
  margin: 0 0 var(--rd-space-1);
  font-size: var(--rd-text-xl);
  font-weight: var(--rd-font-extrabold);
  color: var(--rd-text-primary);
  letter-spacing: var(--rd-letter-tight);
  line-height: var(--rd-leading-tight);
}
.revolv-shell--bt .rd-ld-contact-details {
  display: flex; align-items: center; gap: var(--rd-space-3);
  flex-wrap: wrap;
  font-size: var(--rd-text-sm); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rd-ld-detail-link {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  color: var(--rd-text-secondary); text-decoration: none;
  font-weight: var(--rd-font-medium);
  padding: var(--rd-space-1) var(--rd-space-2);
  border-radius: var(--rd-radius-sm);
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-detail-link:hover {
  background: var(--rd-accent-soft);
  color: var(--rd-accent-deep);
  text-decoration: none;
}
.revolv-shell--bt .rd-ld-detail-link svg { color: var(--rd-text-subtle); }
.revolv-shell--bt .rd-ld-detail-link:hover svg { color: var(--rd-accent); }
.revolv-shell--bt .rd-ld-source {
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-semibold);
  color: var(--rd-text-muted);
  background: var(--rd-bg-subtle);
  padding: var(--rd-space-1) var(--rd-space-2);
  border-radius: var(--rd-radius-pill);
  text-transform: uppercase; letter-spacing: var(--rd-letter-wide);
}

/* ─── Action bar (Call · Text · Email · etc.) ──────────────
 * Re-skin: collapse 7 differently-colored buttons into a unified
 * action bar where the 3 communication actions (Call / Text /
 * Email) read as primary, and the 4 utility actions read as
 * secondary. Visual cohesion = BoomTown signature. */
.revolv-shell--bt .rd-ld-actions {
  display: flex; flex-wrap: wrap; gap: var(--rd-space-2);
  flex-shrink: 0;
}
.revolv-shell--bt .rd-ld-action-btn {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-bg-surface);
  color: var(--rd-text-secondary);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-semibold);
  text-decoration: none; cursor: pointer;
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-action-btn:hover {
  background: var(--rd-bg-subtle);
  border-color: var(--rd-border-strong);
  color: var(--rd-text-primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--rd-shadow-sm);
}
.revolv-shell--bt .rd-ld-action-btn svg { color: var(--rd-text-subtle); transition: color var(--rd-dur-fast) var(--rd-ease-snap); }
.revolv-shell--bt .rd-ld-action-btn:hover svg { color: var(--rd-accent); }

/* The 3 PRIMARY communication actions get the brand accent fill */
.revolv-shell--bt .rd-ld-action-green,    /* Call  */
.revolv-shell--bt .rd-ld-action-blue,     /* Text  */
.revolv-shell--bt .rd-ld-action-purple {  /* Email */
  background: var(--rd-accent);
  border-color: var(--rd-accent);
  color: var(--rd-text-on-accent);
}
.revolv-shell--bt .rd-ld-action-green svg,
.revolv-shell--bt .rd-ld-action-blue svg,
.revolv-shell--bt .rd-ld-action-purple svg { color: var(--rd-text-on-accent); }
.revolv-shell--bt .rd-ld-action-green:hover,
.revolv-shell--bt .rd-ld-action-blue:hover,
.revolv-shell--bt .rd-ld-action-purple:hover {
  background: var(--rd-accent-hover);
  border-color: var(--rd-accent-hover);
  color: var(--rd-text-on-accent);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.30);
}
.revolv-shell--bt .rd-ld-action-green:hover svg,
.revolv-shell--bt .rd-ld-action-blue:hover svg,
.revolv-shell--bt .rd-ld-action-purple:hover svg { color: var(--rd-text-on-accent); }

/* "View as client" stays purple-tinted to signal the impersonation context */
.revolv-shell--bt a.rd-ld-action-purple#rd-ld-action-viewas {
  background: var(--rd-info-soft);
  border-color: var(--rd-info-border);
  color: var(--rd-info);
}
.revolv-shell--bt a.rd-ld-action-purple#rd-ld-action-viewas svg { color: var(--rd-info); }
.revolv-shell--bt a.rd-ld-action-purple#rd-ld-action-viewas:hover {
  background: var(--rd-info);
  color: var(--rd-text-on-accent);
}
.revolv-shell--bt a.rd-ld-action-purple#rd-ld-action-viewas:hover svg { color: var(--rd-text-on-accent); }

/* ─── Lead Alerts card (sits below the sticky header) ───── */
.revolv-shell--bt .rd-ld-alerts-card {
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-4);
  margin-bottom: var(--rd-space-4);
  box-shadow: var(--rd-shadow-xs);
}
.revolv-shell--bt .rd-ld-alerts-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--rd-space-3);
  padding-bottom: var(--rd-space-3);
  border-bottom: 1px solid var(--rd-border-default);
}
.revolv-shell--bt .rd-ld-alerts-icon { font-size: var(--rd-text-lg); margin-right: var(--rd-space-1); }
.revolv-shell--bt .rd-ld-alerts-title {
  font-size: var(--rd-text-md); font-weight: var(--rd-font-bold);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-ld-alerts-count {
  display: inline-block; margin-left: var(--rd-space-2);
  padding: 2px 8px; background: var(--rd-accent); color: var(--rd-text-on-accent);
  border-radius: var(--rd-radius-pill);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-bold);
  font-variant-numeric: tabular-nums;
}
.revolv-shell--bt .rd-ld-alerts-action {
  display: inline-flex; align-items: center;
  padding: var(--rd-space-1) var(--rd-space-3);
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-semibold); cursor: pointer;
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-alerts-action:hover {
  background: var(--rd-accent-soft);
  border-color: var(--rd-accent-subtle);
  color: var(--rd-accent-deep);
}
.revolv-shell--bt .rd-ld-alerts-empty {
  text-align: center; padding: var(--rd-space-4);
  color: var(--rd-text-muted); font-size: var(--rd-text-sm);
  font-style: italic;
}

/* Mobile — un-stick on small screens to keep the action bar usable */
@media (max-width: 768px) {
  .revolv-shell--bt .rd-ld-topbar {
    margin: 0 calc(var(--rd-space-4) * -1);
    padding: var(--rd-space-2) var(--rd-space-4);
  }
  .revolv-shell--bt .rd-ld-header {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: var(--rd-space-3);
  }
  .revolv-shell--bt .rd-ld-actions { width: 100%; justify-content: stretch; }
  .revolv-shell--bt .rd-ld-action-btn { flex: 1 1 calc(50% - var(--rd-space-1)); justify-content: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .revolv-shell--bt .rd-ld-action-btn,
  .revolv-shell--bt .rd-ld-back,
  .revolv-shell--bt .rd-ld-detail-link { transition: none; transform: none !important; }
}

/* =============================================================
 * PHASE 4 — Predictive heat indicator (v1.45.48)
 *
 * BoomTown signature visual: every place a lead score appears
 * uses the SAME heat scale (cold → cool → warm → hot → fire) so
 * agents instantly recognize the "temperature" of a lead anywhere
 * in the app. Works across:
 *   - Inbox card grid       (.rd-ltbl-score-*)        already in Phase 2
 *   - Lead-detail topbar    (.rd-ld-score-*)          already in Phase 3
 *   - Drag-drop kanban      (.rcrm-akb-tier-*)        ← NEW
 *   - Broker activity feed  (.rcrm-hot-pill)          ← NEW (was raw emoji)
 *   - Activity feed row     [data-categories~="hot"]  ← NEW (subtle row tint)
 *   - Universal data-attr   [data-score-tier]         ← NEW (future-proof)
 *   - Reusable utility      .rd-heat                  already in Phase 0
 *
 * No markup or JS changes. CSS-only re-skin of existing classes.
 * ============================================================= */

/* ─── Drag-drop kanban tier chip (.rcrm-akb-tier-*) ──────── */
.revolv-shell--bt .rcrm-akb-tier {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: 2px var(--rd-space-2);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-extrabold);
  text-transform: uppercase; letter-spacing: var(--rd-letter-wide);
  border-radius: var(--rd-radius-pill); line-height: 1;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}
.revolv-shell--bt .rcrm-akb-tier-fire,
.revolv-shell--bt .rcrm-akb-tier-hot {
  background: var(--rd-heat-fire-soft);
  color: var(--rd-heat-fire);
}
.revolv-shell--bt .rcrm-akb-tier-warm {
  background: var(--rd-heat-warm-soft);
  color: var(--rd-heat-warm);
}
.revolv-shell--bt .rcrm-akb-tier-cool {
  background: var(--rd-heat-cool-soft);
  color: var(--rd-heat-cool);
}
.revolv-shell--bt .rcrm-akb-tier-cold {
  background: var(--rd-heat-cold-soft);
  color: var(--rd-heat-cold);
}
/* Add a flame prefix to hot/fire tiers so it reads at a glance */
.revolv-shell--bt .rcrm-akb-tier-fire::before,
.revolv-shell--bt .rcrm-akb-tier-hot::before {
  content: "🔥"; margin-right: 2px; font-size: 10px;
}

/* ─── Broker dashboard "hot" pill (was raw 🔥 emoji) ─────── */
.revolv-shell--bt .rcrm-hot-pill {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: var(--rd-space-2);
  padding: 2px var(--rd-space-2);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-extrabold);
  text-transform: uppercase; letter-spacing: var(--rd-letter-wide);
  border-radius: var(--rd-radius-pill); line-height: 1;
  background: var(--rd-heat-fire-soft); color: var(--rd-heat-fire);
}
/* Append a "Hot" label after the existing emoji content (CSS injected) */
.revolv-shell--bt .rcrm-hot-pill::after {
  content: " Hot"; font-style: normal;
}

/* ─── Subtle row treatment for activity rows on hot leads ── */
.revolv-shell--bt .rcrm-feed-row[data-categories~="hot"] {
  background: linear-gradient(
    90deg,
    var(--rd-heat-fire-soft) 0%,
    var(--rd-heat-fire-soft) 4px,
    var(--rd-bg-surface) 4px,
    var(--rd-bg-surface) 100%
  );
  border-left: 3px solid var(--rd-heat-fire);
  padding-left: calc(var(--rd-space-2) - 3px) !important;
}

/* ─── Universal data-attr selector for any future markup ── */
.revolv-shell--bt [data-score-tier] {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: 2px var(--rd-space-2);
  font-size: var(--rd-text-xs); font-weight: var(--rd-font-bold);
  border-radius: var(--rd-radius-pill); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--rd-bg-subtle); color: var(--rd-text-secondary);
}
.revolv-shell--bt [data-score-tier="fire"] { background: var(--rd-heat-fire-soft); color: var(--rd-heat-fire); }
.revolv-shell--bt [data-score-tier="hot"]  { background: var(--rd-heat-fire-soft); color: var(--rd-heat-fire); }
.revolv-shell--bt [data-score-tier="warm"] { background: var(--rd-heat-warm-soft); color: var(--rd-heat-warm); }
.revolv-shell--bt [data-score-tier="cool"] { background: var(--rd-heat-cool-soft); color: var(--rd-heat-cool); }
.revolv-shell--bt [data-score-tier="cold"] { background: var(--rd-heat-cold-soft); color: var(--rd-heat-cold); }

/* ─── Polish the inbox + lead-detail score chips slightly bolder
 * so the temperature signal pops more.  The Phase 2 + 3 rules already
 * set the colors; these just bump the visual weight.                 */
.revolv-shell--bt .rd-ltbl-score,
.revolv-shell--bt .rd-ld-score {
  font-weight: var(--rd-font-extrabold);
  letter-spacing: var(--rd-letter-wide);
}
.revolv-shell--bt .rd-ltbl-score-hot::before { content: "🔥"; margin-right: 3px; font-size: 10px; }
.revolv-shell--bt .rd-ltbl-score-warm::before { content: "☀"; margin-right: 3px; font-size: 10px; }
.revolv-shell--bt .rd-ltbl-score-cold::before { content: "❄"; margin-right: 3px; font-size: 10px; }
.revolv-shell--bt .rd-ld-score-hot::before  { content: "🔥"; margin-right: 3px; font-size: 11px; }
.revolv-shell--bt .rd-ld-score-warm::before { content: "☀"; margin-right: 3px; font-size: 11px; }
.revolv-shell--bt .rd-ld-score-cold::before { content: "❄"; margin-right: 3px; font-size: 11px; }

/* =============================================================
 * PHASE 5 — Activity-first lead detail (v1.45.49)
 *
 * Timeline is already the default tab on lead-open (verified in
 * dashboard.js: `openLeadDetail(id, initialTab='timeline')`).
 * This phase polishes the tab bar + the timeline + sibling panels
 * to BoomTown standard so the FIRST thing an agent sees feels rich:
 * iconified event rows, color-coded by type, time-ago labels,
 * clean empty states. Same gating, no markup or JS changes.
 * ============================================================= */

/* ─── Tab bar (tabs at top of lead-detail center column) ─── */
.revolv-shell--bt .rd-ld-tabs {
  display: flex; flex-wrap: wrap; gap: var(--rd-space-1);
  padding: var(--rd-space-2);
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  margin-bottom: var(--rd-space-3);
  box-shadow: var(--rd-shadow-xs);
}
.revolv-shell--bt .rd-ld-tab {
  display: inline-flex; align-items: center; gap: var(--rd-space-1);
  padding: var(--rd-space-2) var(--rd-space-3);
  background: transparent; color: var(--rd-text-secondary);
  border: 0; border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-semibold);
  cursor: pointer; line-height: 1;
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-tab:hover {
  background: var(--rd-bg-subtle);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-ld-tab:focus-visible {
  outline: var(--rd-focus-outline); outline-offset: var(--rd-focus-offset);
}
.revolv-shell--bt .rd-ld-tab.active {
  background: var(--rd-accent-soft);
  color: var(--rd-accent-deep);
  font-weight: var(--rd-font-bold);
  box-shadow: 0 1px 0 var(--rd-accent) inset;
}
.revolv-shell--bt .rd-ld-tabct {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; padding: 1px 6px;
  background: rgba(15, 23, 42, 0.06); color: inherit; opacity: 0.85;
  border-radius: var(--rd-radius-pill);
  font-size: 10px; font-weight: var(--rd-font-bold); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.revolv-shell--bt .rd-ld-tab.active .rd-ld-tabct {
  background: var(--rd-bg-surface);
  color: var(--rd-accent);
}

/* ─── Tab panels — common card surface ───────────────────── */
.revolv-shell--bt .rd-ld-panel {
  background: var(--rd-bg-surface);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-lg);
  padding: var(--rd-space-5);
  box-shadow: var(--rd-shadow-xs);
}

/* ─── Timeline panel (default view — the BoomTown signature) ─ */
.revolv-shell--bt .rd-ld-timeline {
  display: flex; flex-direction: column;
}
.revolv-shell--bt .rd-ld-tl-item {
  display: flex; gap: var(--rd-space-3);
  padding: var(--rd-space-3) 0;
  border-bottom: 1px solid var(--rd-border-subtle);
  position: relative;
  align-items: flex-start;
}
.revolv-shell--bt .rd-ld-tl-item:last-child { border-bottom: 0; }
/* Connector line down the middle of each timeline item icon column */
.revolv-shell--bt .rd-ld-tl-item::before {
  content: '';
  position: absolute;
  left: 17px; /* center of the 32px icon = 16px + 1px */
  top: 50px;
  bottom: -2px;
  width: 1px;
  background: var(--rd-border-default);
}
.revolv-shell--bt .rd-ld-tl-item:last-child::before { display: none; }

.revolv-shell--bt .rd-ld-tl-icon {
  width: 32px; height: 32px;
  border-radius: var(--rd-radius-circle);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1;
  border: 2px solid var(--rd-bg-surface);
  box-shadow: 0 0 0 1px var(--rd-border-default);
  transition: transform var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-tl-item:hover .rd-ld-tl-icon { transform: scale(1.05); }

/* Icon color treatments — semantic per event type */
.revolv-shell--bt .rd-ld-tl-icon-note  { background: var(--rd-warning-soft); color: var(--rd-warning); }
.revolv-shell--bt .rd-ld-tl-icon-msg   { background: var(--rd-info-soft);    color: var(--rd-info); }
.revolv-shell--bt .rd-ld-tl-icon-call  { background: var(--rd-success-soft); color: var(--rd-success); }
.revolv-shell--bt .rd-ld-tl-icon-stage { background: var(--rd-accent-soft);  color: var(--rd-accent-deep); }
.revolv-shell--bt .rd-ld-tl-icon-task  { background: var(--rd-accent-soft);  color: var(--rd-accent); }
.revolv-shell--bt .rd-ld-tl-icon-event { background: var(--rd-info-soft);    color: var(--rd-info); }

.revolv-shell--bt .rd-ld-tl-body { flex: 1; min-width: 0; padding-top: 4px; }
.revolv-shell--bt .rd-ld-tl-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--rd-space-2); margin-bottom: var(--rd-space-1);
}
.revolv-shell--bt .rd-ld-tl-head strong {
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold);
  color: var(--rd-text-primary);
}
.revolv-shell--bt .rd-ld-tl-time {
  font-size: var(--rd-text-xs); color: var(--rd-text-muted);
  font-weight: var(--rd-font-medium); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.revolv-shell--bt .rd-ld-tl-text {
  font-size: var(--rd-text-sm); color: var(--rd-text-secondary);
  line-height: var(--rd-leading-normal);
}
.revolv-shell--bt .rd-ld-tl-src {
  font-size: var(--rd-text-xs); color: var(--rd-text-subtle);
  margin-top: var(--rd-space-1);
}
.revolv-shell--bt .rd-ld-tl-src a {
  color: var(--rd-text-muted); text-decoration: none;
  font-weight: var(--rd-font-medium);
}
.revolv-shell--bt .rd-ld-tl-src a:hover { color: var(--rd-accent); text-decoration: none; }

/* ─── Empty state for any panel ──────────────────────────── */
.revolv-shell--bt .rd-empty-sm {
  text-align: center; padding: var(--rd-space-10) var(--rd-space-4);
  color: var(--rd-text-muted);
  font-size: var(--rd-text-sm); font-style: italic;
}

/* ─── Notes panel polish ─────────────────────────────────── */
.revolv-shell--bt .rd-ld-note-form {
  display: flex; flex-direction: column; gap: var(--rd-space-2);
  padding-bottom: var(--rd-space-4);
  border-bottom: 1px solid var(--rd-border-default);
  margin-bottom: var(--rd-space-4);
}
.revolv-shell--bt .rd-ld-textarea,
.revolv-shell--bt .rd-ld-input {
  width: 100%;
  padding: var(--rd-space-2) var(--rd-space-3);
  font: inherit; font-size: var(--rd-text-sm); color: var(--rd-text-primary);
  background: var(--rd-bg-subtle);
  border: 1px solid var(--rd-border-default);
  border-radius: var(--rd-radius-md);
  resize: vertical;
  transition: border-color var(--rd-dur-fast) var(--rd-ease-snap),
              box-shadow var(--rd-dur-fast) var(--rd-ease-snap),
              background var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-textarea:focus,
.revolv-shell--bt .rd-ld-input:focus {
  outline: none;
  background: var(--rd-bg-surface);
  border-color: var(--rd-border-focus);
  box-shadow: var(--rd-shadow-focus);
}

.revolv-shell--bt .rd-ld-notes-list .rd-ld-note,
.revolv-shell--bt .rd-ld-notes-list > div {
  padding: var(--rd-space-3); margin-bottom: var(--rd-space-2);
  background: var(--rd-warning-soft);
  border-left: 3px solid var(--rd-warning);
  border-radius: 0 var(--rd-radius-md) var(--rd-radius-md) 0;
  font-size: var(--rd-text-sm); color: var(--rd-text-primary);
  line-height: var(--rd-leading-normal);
}

/* ─── Messages panel polish ──────────────────────────────── */
.revolv-shell--bt .rd-ld-msg-thread {
  display: flex; flex-direction: column; gap: var(--rd-space-2);
  max-height: 480px; overflow-y: auto;
  padding-bottom: var(--rd-space-4);
  border-bottom: 1px solid var(--rd-border-default);
  margin-bottom: var(--rd-space-3);
}
.revolv-shell--bt .rd-ld-msg-compose {
  display: flex; flex-direction: column; gap: var(--rd-space-2);
}
.revolv-shell--bt .rd-ld-msg-compose-row {
  display: flex; gap: var(--rd-space-2);
}
.revolv-shell--bt .rd-ld-msg-channel {
  padding: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-bg-subtle); color: var(--rd-text-primary);
  border: 1px solid var(--rd-border-default); border-radius: var(--rd-radius-md);
  font: inherit; font-size: var(--rd-text-sm); font-weight: var(--rd-font-semibold);
}
.revolv-shell--bt .rd-ld-msg-subject {
  flex: 1;
  padding: var(--rd-space-2) var(--rd-space-3);
  background: var(--rd-bg-subtle); color: var(--rd-text-primary);
  border: 1px solid var(--rd-border-default); border-radius: var(--rd-radius-md);
  font: inherit; font-size: var(--rd-text-sm);
}
.revolv-shell--bt .rd-ld-msg-body {
  width: 100%; min-height: 60px;
  padding: var(--rd-space-3);
  background: var(--rd-bg-subtle); color: var(--rd-text-primary);
  border: 1px solid var(--rd-border-default); border-radius: var(--rd-radius-md);
  font: inherit; font-size: var(--rd-text-sm); resize: vertical;
}
.revolv-shell--bt .rd-ld-msg-channel:focus,
.revolv-shell--bt .rd-ld-msg-subject:focus,
.revolv-shell--bt .rd-ld-msg-body:focus {
  outline: none;
  background: var(--rd-bg-surface);
  border-color: var(--rd-border-focus);
  box-shadow: var(--rd-shadow-focus);
}
.revolv-shell--bt .rd-ld-msg-compose-actions {
  display: flex; justify-content: flex-end;
}

/* ─── Tasks panel polish ─────────────────────────────────── */
.revolv-shell--bt .rd-ld-task-form {
  display: flex; gap: var(--rd-space-2);
  padding-bottom: var(--rd-space-4);
  border-bottom: 1px solid var(--rd-border-default);
  margin-bottom: var(--rd-space-3);
}
.revolv-shell--bt .rd-ld-task-form .rd-ld-input { flex: 1; }

/* ─── Primary button used inside lead-detail panels ──────── */
.revolv-shell--bt .rd-ld-panel .rd-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--rd-space-2) var(--rd-space-4);
  background: var(--rd-accent); color: var(--rd-text-on-accent);
  border: 0; border-radius: var(--rd-radius-md);
  font-size: var(--rd-text-sm); font-weight: var(--rd-font-bold);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(255, 107, 53, 0.20);
  transition: all var(--rd-dur-fast) var(--rd-ease-snap);
}
.revolv-shell--bt .rd-ld-panel .rd-btn-primary:hover {
  background: var(--rd-accent-hover);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.30);
  transform: translateY(-1px);
}

/* ─── Mobile — tab bar wraps cleanly ──────────────────────── */
@media (max-width: 768px) {
  .revolv-shell--bt .rd-ld-tabs { padding: var(--rd-space-1); gap: 2px; }
  .revolv-shell--bt .rd-ld-tab { padding: var(--rd-space-2); font-size: var(--rd-text-xs); }
  .revolv-shell--bt .rd-ld-msg-compose-row { flex-direction: column; }
}

/* ─── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .revolv-shell--bt .rd-ld-tab,
  .revolv-shell--bt .rd-ld-tl-icon,
  .revolv-shell--bt .rd-ld-textarea,
  .revolv-shell--bt .rd-ld-input { transition: none; transform: none !important; }
}
