/* ═══════════════════════════════════════════════
   LeapReach Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Backgrounds */
  --bg-primary:    #11111e;
  --bg-secondary:  #1a1a2e;
  --bg-card:       #1e1e32;
  --bg-row-alt:    #161628;
  --bg-header:     #1a1a2e;

  /* Accent */
  --accent-green:  #00c781;
  --accent-cyan:   #49cef4;
  --accent-red:    #ff4444;
  --accent-amber:  #ffaa00;
  --accent-blue:   #4ea7fc;
  --accent-yellow: #faad14;

  /* Text */
  --text-primary:  #ffffff;
  --text-muted:    #9999b2;
  --text-dim:      #666680;

  /* Borders & tracks */
  --border:        #2a2a3e;
  --progress-track: #2a2a3e;

  /* Status badge backgrounds */
  --badge-active:    rgba(0, 199, 129, 0.15);
  --badge-pending:   rgba(153, 153, 178, 0.15);
  --badge-failed:    rgba(255, 68, 68, 0.15);
  --badge-completed: rgba(73, 206, 244, 0.15);
  --badge-replied:   rgba(255, 170, 0, 0.15);
  --badge-skipped:   rgba(102, 102, 128, 0.15);

  /* Spacing */
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 64px;
  --topbar-height: 64px;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
}

/* ═══════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-green);
}

/* ═══════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ─── */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  min-height: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  transition: width 180ms ease, min-width 180ms ease;
}
/* Collapsed rail — icons only. `.is-collapsed` is applied by
   ``applySidebarCollapsed`` and mirrored into localStorage, so the choice
   survives reloads and the hard navigation to /prospect/<id>. */
.sidebar.is-collapsed {
  width: var(--sidebar-width-collapsed);
  min-width: var(--sidebar-width-collapsed);
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 12px 16px 20px;
}
.sidebar.is-collapsed .sidebar-head {
  flex-direction: column;
  align-items: center;
  padding: 20px 0 12px;
}

.sidebar-logo h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.sidebar-logo h1 span {
  color: var(--accent-green);
}
.sidebar-logo .logo-underline {
  display: block;
  width: 34px;
  height: 3px;
  background: var(--accent-green);
  margin-top: 6px;
  border-radius: 2px;
}

/* Collapsed wordmark. Exactly one of `.sidebar-logo` / `.sidebar-logo-mini`
   is in flow at a time. */
.sidebar-logo-mini {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 26px;
  display: none;
}
.sidebar-logo-mini span { color: var(--accent-green); }
.sidebar.is-collapsed .sidebar-logo { display: none; }
.sidebar.is-collapsed .sidebar-logo-mini { display: block; }

.sidebar-toggle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.sidebar-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.sidebar-toggle svg { transition: transform 180ms ease; }
.sidebar.is-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: #3d3d5c;
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 41px;
  /* 2.5px border + 17.5px padding = a 20px content edge that doesn't
     shift when the active marker appears. */
  padding: 0 20px 0 17.5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 2.5px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}
/* Collapsed: no label, so centre the 16px glyph in the 64px rail
   (2.5px border + 21.5px padding + 8px half-icon = 32px). */
.sidebar.is-collapsed .nav-item { padding: 0 0 0 21.5px; }
.sidebar.is-collapsed .nav-item .nav-label { display: none; }
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none; /* beat the global `a:hover` underline */
}
.nav-item.active {
  color: var(--text-primary);
  background: rgba(0, 199, 129, 0.08);
  border-left-color: var(--accent-green);
}
.nav-item .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--text-muted);
}
.nav-item.active .nav-icon {
  stroke: var(--accent-green);
}
.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Unread markers. Expanded shows the count pill (`.nav-badge`, styled in the
   Inbox section); the collapsed rail has no room for a number, so the same
   signal becomes a dot on the icon's shoulder. Both are driven purely off
   `.nav-item.has-badge` — set it with ``setNavBadge``, never by writing
   `style.display` on the pill (an inline style would beat these rules). */
.nav-item .nav-badge { display: none; }
.nav-item.has-badge .nav-badge { display: inline-flex; }
.sidebar.is-collapsed .nav-item .nav-badge { display: none; }

.nav-dot {
  position: absolute;
  top: 12px;
  left: 33px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg-secondary);
  box-sizing: content-box;
  display: none;
}
.sidebar.is-collapsed .nav-item.has-badge .nav-dot { display: block; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar.is-collapsed .sidebar-user { padding: 16px 17px; }
.sidebar-user .user-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--badge-active);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-user .user-meta { min-width: 0; }
.sidebar.is-collapsed .sidebar-user .user-meta { display: none; }
.sidebar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-email {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Main Content ─── */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title {
  font-size: 18px;
  font-weight: 600;
}
.topbar-actions {
  display: flex;
  gap: 10px;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ═══════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent-green);
  color: #000;
}
.btn-primary:hover {
  background: #00d98c;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.btn-danger {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid rgba(255, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(255, 68, 68, 0.1);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════
   Stat Cards
   ═══════════════════════════════════════════════ */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  animation: fadeIn 0.3s ease forwards;
  opacity: 0;
}
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 40ms; }
.stat-card:nth-child(3) { animation-delay: 80ms; }
.stat-card:nth-child(4) { animation-delay: 120ms; }
.stat-card:nth-child(5) { animation-delay: 160ms; }

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-green);
  margin-top: 6px;
  line-height: 1;
}
.stat-card .stat-value.cyan  { color: var(--accent-cyan); }
.stat-card .stat-value.amber { color: var(--accent-amber); }
.stat-card .stat-value.red   { color: var(--accent-red); }
.stat-card .stat-value.muted { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   Tables
   ═══════════════════════════════════════════════ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.data-table tbody tr:nth-child(even) {
  background: var(--bg-row-alt);
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.data-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-header h3 {
  font-size: 15px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-active      { background: var(--badge-active);    color: var(--accent-green); }
.badge-pending     { background: var(--badge-pending);   color: var(--text-muted); }
.badge-failed      { background: var(--badge-failed);    color: var(--accent-red); }
.badge-completed   { background: var(--badge-completed); color: var(--accent-cyan); }
.badge-replied     { background: var(--badge-replied);   color: var(--accent-amber); }
.badge-skipped     { background: var(--badge-skipped);   color: var(--text-dim); }
.badge-queued      { background: var(--badge-pending);   color: var(--text-muted); }
.badge-in_progress { background: var(--badge-replied);   color: var(--accent-amber); }
.badge-paused     { background: rgba(255, 170, 0, 0.15); color: var(--accent-amber); }
.badge-started     { background: var(--badge-replied);   color: var(--accent-amber); }

/* ═══════════════════════════════════════════════
   Progress Bars
   ═══════════════════════════════════════════════ */

.progress-track {
  height: 3px;
  background: var(--progress-track);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════════
   Filter Pills
   ═══════════════════════════════════════════════ */

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.filter-pill:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.filter-pill.active {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
}

.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════
   Upload Zone
   ═══════════════════════════════════════════════ */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 24px;
  background: var(--bg-card);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-green);
  background: rgba(0, 199, 129, 0.05);
}
.upload-zone .upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.upload-zone .upload-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.upload-zone .upload-hint code {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.upload-result {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
}
.upload-result.success {
  background: rgba(0, 199, 129, 0.1);
  border: 1px solid rgba(0, 199, 129, 0.3);
  color: var(--accent-green);
}
.upload-result.error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: var(--accent-red);
}

/* ═══════════════════════════════════════════════
   Activity Feed (Campaigns)
   ═══════════════════════════════════════════════ */

.activity-feed {
  list-style: none;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-dot.green  { background: var(--accent-green); }
.activity-dot.red    { background: var(--accent-red); }
.activity-dot.cyan   { background: var(--accent-cyan); }
.activity-dot.amber  { background: var(--accent-amber); }
.activity-dot.grey   { background: var(--text-dim); }

.activity-text {
  flex: 1;
  font-size: 13px;
}
.activity-text strong { font-weight: 600; }
.activity-text .activity-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.activity-time {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   Timeline (Activity page)
   ═══════════════════════════════════════════════ */

.timeline {
  position: relative;
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  position: relative;
}
.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-dot.completed   { background: var(--accent-green); }
.timeline-dot.failed      { background: var(--accent-red); }
.timeline-dot.skipped     { background: var(--text-dim); }
.timeline-dot.queued      { background: var(--text-muted); }
.timeline-dot.started,
.timeline-dot.in_progress { background: var(--accent-amber); }

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}
.timeline-body {
  flex: 1;
  min-width: 0;
}
.timeline-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.timeline-action {
  font-size: 14px;
  font-weight: 600;
}
.timeline-contact {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.timeline-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.timeline-cadence {
  font-size: 11px;
  color: var(--text-dim);
}
.timeline-cancel-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 8px;
  transition: color 0.15s, border-color 0.15s;
}
.timeline-cancel-btn:hover {
  color: #f87171;
  border-color: #f87171;
}

.timeline-detail {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.timeline-detail.error-detail {
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: var(--accent-red);
}
.timeline-detail.reply-detail {
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.2);
  color: var(--accent-amber);
}

/* ── Activity page enhancements (TEN-43) ──── */

.timeline-icon {
  font-size: 16px;
  margin-right: 8px;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.timeline-contact {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-contact .contact-name {
  color: var(--text-secondary, #c0c0d0);
  font-weight: 500;
}

.timeline-campaign {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.queue-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-right: 8px;
}

.timeline-eta {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-cyan);
}

.timeline-item.running-highlight {
  background: rgba(0, 199, 129, 0.05);
  border: 1px solid rgba(0, 199, 129, 0.15);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}

.timeline-item.queued-item {
  opacity: 0.85;
}

.queue-time-group {
  margin-bottom: 16px;
}

.queue-group-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.mini-stat.running-active {
  border-color: rgba(255, 170, 0, 0.3);
  background: rgba(255, 170, 0, 0.05);
}

.mini-stat.running-active .mini-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.timeline-more {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 16px 0;
}

/* ── Notifications Page ── */

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
  align-items: flex-start;
  transition: background 0.15s;
}

.notif-item.notif-unread {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(73, 206, 244, 0.04);
}

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notif-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.notif-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}

.notif-time {
  color: var(--text-dim);
}

.notif-link {
  color: var(--accent-cyan);
  text-decoration: none;
}
.notif-link:hover {
  text-decoration: underline;
}

.notif-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.notif-read-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 10px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.notif-read-btn:hover {
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.notif-requeue-btn {
  font-size: 11px;
  padding: 4px 12px;
  white-space: nowrap;
}
.notif-requeue-btn.btn-success {
  color: var(--accent-green);
  border-color: var(--accent-green);
  cursor: default;
}

.timeline-link {
  text-decoration: none;
  transition: color 0.15s;
}
.timeline-link:hover {
  color: var(--accent-cyan) !important;
  text-decoration: underline;
}

.timeline-user-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin-left: 8px;
  vertical-align: middle;
}

.activity-user-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  min-width: 140px;
}
.activity-user-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.timeline-item[data-tooltip] {
  position: relative;
  cursor: default;
}
.timeline-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 40px;
  right: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  max-height: 200px;
  overflow: hidden;
}
.timeline-item[data-tooltip]:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   Cadence Builder
   ═══════════════════════════════════════════════ */

.cadence-builder {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.cadence-settings .form-group {
  margin-bottom: 16px;
}
.cadence-settings label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.cadence-settings input,
.cadence-settings textarea {
  width: 100%;
}
.cadence-settings textarea {
  min-height: 80px;
  resize: vertical;
}
.cadence-stats {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Step pipeline */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  position: relative;
  border-left: 3px solid var(--border);
}
.step-card.connection_request { border-left-color: var(--accent-green); }
.step-card.wait               { border-left-color: var(--accent-amber); }
.step-card.message            { border-left-color: var(--accent-cyan); }

.step-connector {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.step-connector .connector-line {
  width: 2px;
  height: 20px;
  background: var(--border);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-number.connection_request { background: var(--badge-active);    color: var(--accent-green); }
.step-number.wait               { background: var(--badge-replied);   color: var(--accent-amber); }
.step-number.message            { background: var(--badge-completed); color: var(--accent-cyan); }

.step-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.step-type-pill {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  border-radius: 12px;
}
.step-type-pill.connection_request { background: var(--badge-active);    color: var(--accent-green); }
.step-type-pill.wait               { background: var(--badge-replied);   color: var(--accent-amber); }
.step-type-pill.message            { background: var(--badge-completed); color: var(--accent-cyan); }

.step-body {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.add-step-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 16px;
}
.add-step-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ═══════════════════════════════════════════════
   Cadence List (cards)
   ═══════════════════════════════════════════════ */

.cadence-search-bar {
  margin-bottom: 16px;
}
.cadence-search-input {
  width: 100%;
  max-width: 400px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.cadence-search-input::placeholder { color: var(--text-dim); }
.cadence-search-input:focus { border-color: var(--accent-green); }
.cadence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.cadence-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.cadence-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}
.cadence-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.cadence-card-name {
  font-size: 16px;
  font-weight: 600;
}
.cadence-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.cadence-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}
.cadence-card-stats span strong {
  color: var(--text-primary);
  font-weight: 600;
}
.cadence-owner-label {
  margin-left: auto;
  color: var(--text-muted);
  font-style: italic;
}

/* Cadence filter bar */
.cadence-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cadence-filter-bar select {
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.cadence-filter-bar select:focus { border-color: var(--accent-green); }

/* Label typeahead wrapper */
.cadence-label-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cadence-label-filter-input {
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 140px;
}
.cadence-label-filter-input::placeholder { color: var(--text-dim); }
.cadence-label-filter-input:focus { border-color: var(--accent-green); }

.cadence-label-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 180px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.cadence-label-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.cadence-label-dropdown-item:hover {
  background: var(--bg-elevated);
}

/* Active filter chips */
.cadence-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cadence-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
}
.cadence-filter-chip-x {
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  margin-left: 2px;
}
.cadence-filter-chip-x:hover { color: var(--accent-red); }

/* Label pills on cards and detail */
.cadence-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cadence-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-muted);
}
.cadence-label-pill-x {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
}
.cadence-label-pill-x:hover { color: var(--accent-red); }

/* "Stuck" pill + Retry button on cadence-contact rows. Marks assignments
   blocked by scheduler Rule A so the BDR knows to click Retry to unstick. */
.cc-stuck-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
/* "Fails ICP" pill — a rerun found the contact disqualified against the
   step's currently pinned ICP version. Forward-only: flagged, never
   auto-removed. Layout copied from .cc-stuck-pill — keep in sync if that
   changes; only the amber palette differs. */
.cc-fails-icp-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 170, 0, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 170, 0, 0.4);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.cc-retry-btn {
  padding: 2px 8px;
  font-size: 11px;
  background: transparent;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  border-radius: 4px;
  cursor: pointer;
}
.cc-retry-btn:hover { background: rgba(74, 222, 128, 0.1); }
.cc-retry-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.contact-row-stuck td {
  background: rgba(248, 113, 113, 0.04);
}
.cc-retry-all-btn { margin-left: 6px; }

/* Invalid LinkedIn URL — sibling of .cc-stuck-pill, in the LinkedIn column.
   Amber (not red) because it's a data-quality issue, not a system fault,
   and the fix is on the BDR's side (edit the contact's URL). */
.cc-invalid-url-pill {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.contact-row-url-invalid td {
  background: rgba(251, 191, 36, 0.03);
}

/* Inline add-label in detail header */
.cadence-add-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}
.cadence-add-label-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ═══════════════════════════════════════════════
   Contact Avatar
   ═══════════════════════════════════════════════ */

.contact-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--badge-active);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   Empty States
   ═══════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.empty-state .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   Modals
   ═══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}
.modal .form-group {
  margin-bottom: 16px;
}
.modal .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.modal .form-group input,
.modal .form-group textarea,
.modal .form-group select {
  width: 100%;
}
.modal .form-group textarea {
  min-height: 80px;
  resize: vertical;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ═══════════════════════════════════════════════
   Mini Stat Cards (Activity)
   ═══════════════════════════════════════════════ */

.mini-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.mini-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.mini-stat .mini-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mini-stat .mini-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text-primary);
}
.mini-stat .mini-value.amber { color: var(--accent-amber); }
.mini-stat .mini-value.red   { color: var(--accent-red); }
.mini-stat .mini-value.green { color: var(--accent-green); }
.mini-stat .mini-value.cyan  { color: var(--accent-cyan); }

/* ═══════════════════════════════════════════════
   Section Grid
   ═══════════════════════════════════════════════ */

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.count-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 8px;
}

/* ═══════════════════════════════════════════════
   Date Filter
   ═══════════════════════════════════════════════ */

.date-filter {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ═══════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ═══════════════════════════════════════════════
   Inline Cadence Select (Contacts table)
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   Cadence Tags (multi-cadence in contacts table)
   ═══════════════════════════════════════════════ */

.cadence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.cadence-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 199, 129, 0.15);
  color: var(--accent-green);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.cadence-tag--overflow {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 10px;
}
.cadence-tag .remove-tag {
  cursor: pointer;
  opacity: 0.5;
  font-size: 10px;
  margin-left: 2px;
}
.cadence-tag .remove-tag:hover {
  opacity: 1;
}
.add-cadence-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.add-cadence-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.cadence-dropdown {
  position: absolute;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cadence-dropdown-item {
  display: block;
  width: 100%;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-primary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.cadence-dropdown-item:hover {
  background: rgba(255,255,255,0.05);
}
.cadence-dropdown-item.disabled {
  color: var(--text-dim);
  cursor: default;
}

.btn-danger-solid {
  background: var(--accent-red);
  color: #fff;
  border: none;
}
.btn-danger-solid:hover {
  background: #ff5555;
}

.cadence-select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  min-width: 140px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.cadence-select:focus {
  border-color: var(--accent-green);
}
.cadence-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════
   Settings Page
   ═══════════════════════════════════════════════ */

.settings-layout {
  max-width: 640px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.settings-row + .settings-row {
  border-top: 1px solid var(--border);
}

.settings-row label {
  font-size: 13px;
  color: var(--text-muted);
}

.settings-row input[type="number"] {
  width: 80px;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
}

.usage-row {
  padding: 8px 0;
}

.usage-row + .usage-row {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.usage-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.usage-count {
  font-weight: 600;
  color: var(--text-primary);
}

.settings-progress-track {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.settings-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill--green { background: var(--accent-green); }
.progress-fill--cyan  { background: var(--accent-cyan); }
.progress-fill--red   { background: var(--accent-red); }

.settings-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* ─── Settings Tabs ─── */

.settings-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 0;
}

.settings-tab {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0;
  position: relative;
}
.settings-tab:hover { color: var(--text-primary); }

.settings-tab--active {
  font-weight: 600;
  color: var(--text-primary);
}
.settings-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-green);
  border-radius: 1px;
}

.settings-tab-line {
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

/* ─── HubSpot Card ─── */

.hs-card {
  max-width: 700px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
}

.hs-card-header { margin-bottom: 0; }

.hs-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.hs-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.hs-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ─── Badges ─── */

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hs-badge--disconnected {
  background: rgba(250, 173, 20, 0.12);
  color: #faad14;
}

.hs-badge--connected {
  background: rgba(0, 199, 129, 0.12);
  color: var(--accent-green);
}

.hs-badge--error {
  background: rgba(255, 77, 79, 0.12);
  color: #ff4d4f;
}

.hs-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hs-status-row .hs-badge { margin-bottom: 0; }

.hs-portal-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Token Input ─── */

.hs-token-section { margin-bottom: 16px; }

.hs-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hs-token-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hs-input-wrap {
  flex: 1;
  position: relative;
}

.hs-input {
  width: 100%;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 0 40px 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.hs-input::placeholder { color: var(--text-dim); }
.hs-input:focus { outline: none; border-color: #4ea7fc; }

.hs-input--masked {
  flex: 1;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

.hs-input--error { border-color: #ff4d4f; }

.hs-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}
.hs-eye-btn:hover { color: var(--text-muted); }

.btn-test-connection {
  height: 44px;
  min-width: 152px;
  background: var(--accent-green);
  color: #0d0d1a;
  border: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-test-connection:hover { opacity: 0.9; }
.btn-test-connection:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-change {
  height: 44px;
  padding: 0 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.btn-change:hover { border-color: var(--text-dim); }

/* ─── Instructions & Scopes ─── */

.hs-instructions { margin-bottom: 16px; }

.hs-instructions-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hs-steps {
  list-style: decimal;
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}

.hs-scopes-section { margin-bottom: 16px; }

.hs-scopes-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hs-scope-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hs-scope-badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11px;
  color: #4ea7fc;
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  width: fit-content;
}

.hs-scope-badge--error {
  border-color: #ff4d4f;
  color: #ff4d4f;
}

.hs-scope-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hs-scope-x { color: #ff4d4f; font-size: 13px; font-weight: 600; }
.hs-scope-ok { color: var(--accent-green); font-size: 13px; font-weight: 600; }

.hs-learn-link {
  display: block;
  font-size: 12px;
  color: #4ea7fc;
  text-decoration: none;
  margin-bottom: 16px;
}
.hs-learn-link:hover { text-decoration: underline; }

/* ─── LinkedIn Banner ─── */

.hs-linkedin-banner {
  background: rgba(78, 167, 252, 0.08);
  border: 1px solid rgba(78, 167, 252, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 4px;
}

.hs-linkedin-banner-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4ea7fc;
  margin-bottom: 2px;
}

.hs-linkedin-banner-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Error Banner ─── */

.hs-error-banner {
  background: rgba(255, 77, 79, 0.08);
  border: 1px solid rgba(255, 77, 79, 0.3);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.hs-error-banner-title {
  font-size: 13px;
  font-weight: 600;
  color: #ff4d4f;
  margin: 0 0 4px;
}

.hs-error-banner-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Sync Settings ─── */

.hs-sync-section { margin-top: 4px; }

.hs-sync-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.hs-sync-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0;
}

.hs-sync-info { flex: 1; }

.hs-sync-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.hs-sync-desc {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

/* Toggle switch */
.hs-toggle { position: relative; cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.hs-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.hs-toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
}

.hs-toggle-thumb {
  display: block;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}

.hs-toggle input:checked + .hs-toggle-track {
  background: var(--accent-green);
}

.hs-toggle input:checked + .hs-toggle-track .hs-toggle-thumb {
  transform: translateX(18px);
}

/* Custom Properties card */
.hs-custom-props-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 4px;
  gap: 12px;
}

.hs-custom-props-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hs-custom-props-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.hs-custom-props-desc {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.hs-props-init-state {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hs-props-init-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.hs-props-rerun-link {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  padding: 2px 8px;
  cursor: pointer;
}
.hs-props-rerun-link:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.hs-props-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hs-props-list-item {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 10px 12px;
}

.hs-props-list-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.hs-props-list-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.hs-props-list-type {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.hs-props-list-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.hs-props-failed {
  border-top: 1px solid rgba(255, 77, 79, 0.2);
  padding-top: 10px;
}

.hs-props-failed-title {
  font-size: 12px;
  font-weight: 600;
  color: #ff4d4f;
  display: block;
  margin-bottom: 6px;
}

.hs-props-failed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hs-props-failed-list li {
  font-size: 11px;
  color: #ff4d4f;
}

.hs-props-failed-list code {
  font-weight: 600;
}

.hs-milestone-badge {
  background: rgba(250, 173, 20, 0.12);
  color: #faad14;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ─── Danger Zone ─── */

.hs-danger-zone { margin-top: 4px; }

.hs-danger-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #ff4d4f;
  margin-bottom: 12px;
}

.hs-danger-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-danger-outline {
  height: 40px;
  padding: 0 20px;
  background: transparent;
  color: #ff4d4f;
  border: 1px solid #ff4d4f;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-outline:hover { background: rgba(255, 77, 79, 0.08); }

.hs-danger-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════
   Pause/Resume Styles
   ═══════════════════════════════════════════════ */

.contact-row--paused {
  opacity: 0.6;
}

.cadence-tag--paused {
  background: rgba(255, 170, 0, 0.15);
  color: var(--accent-amber);
}

.pause-icon {
  font-size: 10px;
  opacity: 0.8;
}

.btn-pause {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-pause:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.btn-resume {
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-resume:hover {
  background: rgba(0, 199, 129, 0.1);
}

/* ── Tab Bar ── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 20px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-dim); font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }

/* ── Pipeline ── */
.pipeline-summary { display: flex; gap: 20px; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.pipeline-stat strong { color: var(--text-primary); }
.pipeline-row { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 8px; }
.pipeline-connector { display: flex; align-items: center; color: var(--text-dim); font-size: 16px; padding: 0 4px; flex-shrink: 0; }
.pipeline-card { flex: 1; min-width: 140px; max-width: 200px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; flex-shrink: 0; }
.pipeline-card:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }
.pipeline-card.green { border-left: 3px solid var(--accent-green); }
.pipeline-card.yellow { border-left: 3px solid var(--accent-amber); }
.pipeline-card.red { border-left: 3px solid var(--accent-red); }
.pipeline-card.neutral { border-left: 3px solid var(--border); }
.pipeline-card.completed { border-left: 3px solid var(--accent-cyan); }
.pipeline-card-step-label { font-size: 11px; font-weight: 500; color: #6b6b7b; margin-bottom: 4px; }
.pipeline-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-card-divider { height: 1px; background: var(--border); margin-bottom: 10px; }
.pipeline-card-count { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.pipeline-card-breakdown { font-size: 11px; color: #a0a0b0; margin-top: 4px; }

/* ── Pipeline Legend ── */
.pipeline-legend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 13px; margin-bottom: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px;
  font-size: 11px; color: #a0a0b0;
}
.legend-title { font-weight: 600; color: var(--text-primary); font-size: 12px; }
.legend-sep { font-weight: 500; color: var(--text-primary); margin-left: 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend-dot.sm { width: 10px; height: 10px; border-radius: 2px; }

/* ── Stacked Bar ── */
.stacked-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,0.04); }
.stacked-bar-seg { height: 100%; transition: width 0.3s; }

/* ── Contacts Filters (pill bar) ── */
.contacts-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 7px 11px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; }

.filter-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: #6b6b7b; font-size: 12px; font-weight: 400;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text-primary); border-color: #444; }
.filter-pill.selected.active { background: rgba(0,199,129,0.15); border-color: #00c781; color: #00c781; font-weight: 600; }
.filter-pill.selected.paused { background: rgba(255,170,0,0.15); border-color: #faad14; color: #faad14; font-weight: 600; }
.filter-pill.selected.replied { background: rgba(187,135,252,0.15); border-color: #bb87fc; color: #bb87fc; font-weight: 600; }
.filter-pill.selected.completed { background: rgba(73,206,244,0.15); border-color: #49cef4; color: #49cef4; font-weight: 600; }
.filter-pill.selected.failed { background: rgba(255,77,79,0.15); border-color: #ff4d4f; color: #ff4d4f; font-weight: 600; }
.filter-pill.selected.removed { background: rgba(107,107,123,0.15); border-color: #6b6b7b; color: #a0a0b0; font-weight: 600; }

.filter-pill-select {
  height: 28px; padding: 0 10px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: #a0a0b0; font-size: 12px; font-family: 'Inter', sans-serif;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}
.filter-pill-select:focus { outline: none; border-color: #49cef4; }

.days-pill {
  gap: 2px; color: #6b6b7b;
}
.days-pill input { width: 30px; background: transparent; border: none; color: var(--text-primary); font-size: 12px; font-family: 'Inter', sans-serif; outline: none; }
.days-pill input::placeholder { color: #6b6b7b; }

.clear-filters-link { margin-left: auto; font-size: 12px; font-weight: 500; color: #4ea7fc; cursor: pointer; white-space: nowrap; }
.clear-filters-link:hover { text-decoration: underline; }

/* ── Bulk Actions Bar ── */
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(73,206,244,0.08); border: 1px solid rgba(73,206,244,0.2); border-radius: 8px; margin-bottom: 12px; }
.bulk-bar.hidden { display: none; }
.bulk-count { font-size: 12px; font-weight: 500; color: var(--accent-cyan); }

/* ── Table Enhancements ── */
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--accent-cyan); }
.data-table tr.selected { background: rgba(73,206,244,0.05); }
.contact-link { color: var(--accent-cyan); text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.text-dim { color: var(--text-dim); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.pagination-info { font-size: 12px; color: var(--text-dim); }

/* ── Contact Detail Header ── */
.contact-detail-header { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.contact-detail-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(73,206,244,0.12); color: var(--accent-cyan); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; flex-shrink: 0; }
.contact-detail-name { margin: 0; font-size: 20px; font-weight: 600; }
.contact-detail-title { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.contact-detail-meta { margin: 4px 0 0; font-size: 11px; color: var(--text-dim); }

/* ── Cadence Assignment Cards ── */
.cadence-assignment-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.assignment-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.assignment-cadence-name { font-weight: 600; font-size: 14px; margin-right: 6px; }
.assignment-step-count { font-size: 11px; color: var(--text-dim); margin-left: 8px; }
.assignment-actions { display: flex; gap: 6px; }
.assignment-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.priority-badge { background: rgba(255,170,0,0.15); color: var(--accent-amber); font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }

/* ── Step Progress Bar ── */
.step-progress { display: flex; align-items: center; gap: 0; margin: 8px 0; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; border: 2px solid var(--border); background: var(--bg-primary); }
.step-dot.completed { background: var(--accent-green); border-color: var(--accent-green); color: #000; }
.step-dot.current { border-color: var(--accent-cyan); color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(73,206,244,0.2); }
.step-dot.upcoming { color: var(--text-dim); }
.step-line { height: 2px; flex: 1; min-width: 12px; background: var(--border); }
.step-line.completed { background: var(--accent-green); }

/* ── Accelerate Status ── */
.accel-status { margin-top: 8px; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.accel-status.hidden { display: none; }
.accel-status.queued { background: rgba(255,170,0,0.08); color: var(--accent-amber); }
.accel-status.executing { background: rgba(73,206,244,0.08); color: var(--accent-cyan); }
.accel-status.done { background: rgba(0,199,129,0.08); color: var(--accent-green); }
.accel-status.failed { background: rgba(255,68,68,0.08); color: var(--accent-red); }
.accel-status.replied { background: rgba(73,206,244,0.08); color: var(--accent-cyan); }

/* ── Engagement Log ── */
.log-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.log-pill.selected { background: rgba(73,206,244,0.15); border-color: var(--accent-cyan); color: var(--accent-cyan); font-weight: 600; }
.engagement-log { display: flex; flex-direction: column; }
.log-entry { padding: 10px 0; border-bottom: 1px solid var(--border); }
.log-entry:last-child { border-bottom: none; }
.log-time { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.log-body { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.log-type { font-size: 13px; font-weight: 500; }
.log-error { font-size: 11px; color: var(--accent-red); }
.log-preview { margin-top: 4px; font-size: 12px; color: var(--text-muted); cursor: pointer; padding: 4px 8px; background: rgba(255,255,255,0.02); border-radius: 4px; }
.log-preview.expanded .log-preview-text { display: none; }
.log-preview.expanded .log-expand-full { display: inline !important; }
.log-preview:hover { background: rgba(255,255,255,0.04); }

/* ── Auth Gate ── */
.auth-gate {
  display: flex; justify-content: center; align-items: center;
  min-height: 80vh; padding: 20px;
}
.auth-gate-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 40px; max-width: 440px;
  text-align: center;
}
.auth-gate-icon { font-size: 48px; margin-bottom: 16px; }
.auth-gate-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.auth-gate-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.auth-steps {
  text-align: left; padding-left: 20px; margin-bottom: 24px;
  font-size: 13px; color: var(--text-muted); line-height: 2;
}
.auth-steps li { color: var(--text-primary); }

/* ═══════════════════════════════════════════════
   HubSpot Import Page
   ═══════════════════════════════════════════════ */

/* Stats cards */
.import-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.import-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}
.import-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.import-stat-value {
  font-size: 24px;
  font-weight: 700;
}

/* Table action buttons */
.import-actions-cell {
  white-space: nowrap;
}
.import-action {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: inherit;
}
.import-action--preview { color: var(--accent-cyan); }
.import-action--run { color: var(--accent-cyan); }
.import-action--edit { color: var(--text-primary); }
.import-action--delete { color: #ff4d4f; }
.import-action:hover { text-decoration: underline; }

/* Rule builder modal */
.import-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.import-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.filter-row select,
.filter-row input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
}
.filter-row .filter-prop {
  flex: 1.2;
  min-width: 0;
}
.filter-row .filter-op {
  flex: 1;
  min-width: 0;
}
.filter-row .filter-val {
  flex: 1;
  min-width: 0;
}

/* Progress view */
.import-progress-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  margin: 80px auto;
}
.import-spinner {
  width: 60px;
  height: 60px;
  border: 3px dashed var(--accent-green);
  border-radius: 50%;
  animation: spin 2s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.import-progress-bar {
  width: 300px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin: 16px auto;
  overflow: hidden;
}
.import-progress-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Complete view */
.import-success-banner {
  background: rgba(0, 199, 129, 0.12);
  border: 1px solid rgba(0, 199, 129, 0.25);
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 20px;
}
.import-summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

/* No connection empty state */
.import-empty {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-yellow);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  max-width: 400px;
}
.import-empty-icon {
  width: 60px;
  height: 60px;
  border: 2px solid var(--accent-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}
.btn-amber {
  background: #faad14;
  color: #0d0d1a;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.btn-amber:hover {
  background: #d49b12;
}

/* Searchable list picker */
.list-picker {
  position: relative;
  width: 100%;
}
.list-picker-trigger {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.list-picker-trigger:hover {
  border-color: var(--accent-cyan);
}
.list-picker-trigger .lp-chevron {
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.15s;
}
.list-picker.open .lp-chevron {
  transform: rotate(180deg);
}
.list-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  max-height: 320px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.list-picker.open .list-picker-dropdown {
  display: flex;
  max-height: 320px;
  overflow: hidden;
}
.list-picker-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.list-picker-search input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  height: 32px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.list-picker-search input:focus {
  border-color: var(--accent-cyan);
}
.list-picker-options {
  overflow-y: auto;
  flex: 1;
  max-height: 260px;
}
.list-picker-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-faint, rgba(255,255,255,0.04));
}
.list-picker-option:last-child {
  border-bottom: none;
}
.list-picker-option:hover {
  background: rgba(255, 255, 255, 0.04);
}
.list-picker-option.selected {
  background: rgba(0, 210, 211, 0.08);
  color: var(--accent-cyan);
}
.list-picker-option .lp-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.list-picker-option .lp-size {
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
  margin-left: 12px;
}
.list-picker-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   Bulk-add to cadence (TEN-60)
   ═══════════════════════════════════════════════ */

/* Sticky-ish action bar that appears above the contacts table
   whenever the user has any rows (or a filter scope) selected. */
.bulk-select-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(73,206,244,0.10);
  border: 1px solid rgba(73,206,244,0.3);
  border-radius: 8px;
}
.bulk-select-bar.hidden { display: none; }
.bulk-select-bar .bulk-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-right: auto;
}

/* "All 50 on this page selected. Select all 340 matching." banner —
   only shown when the header checkbox is fully checked and the
   filtered dataset is larger than the rendered page. */
.bulk-select-expand {
  padding: 8px 14px;
  background: rgba(73,206,244,0.04);
  border: 1px dashed rgba(73,206,244,0.3);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.bulk-select-expand.hidden { display: none; }
.bulk-select-expand-link {
  color: var(--accent-cyan);
  cursor: pointer;
  margin-left: 6px;
  font-weight: 500;
}
.bulk-select-expand-link:hover { text-decoration: underline; }

/* Checkbox column — tight width, no text-select on header click. */
.data-table th.checkbox-col,
.data-table td.checkbox-col {
  width: 36px;
  padding-left: 12px;
  padding-right: 0;
  text-align: left;
  user-select: none;
}
.data-table tr.row-selected {
  background: rgba(73,206,244,0.06);
}
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
}
.btn-text:hover { color: var(--text-primary); text-decoration: underline; }

/* Cadence picker dropdown — small searchable list anchored under the
   "Add to cadence" button in the action bar. */
.cadence-picker-dropdown {
  z-index: 2000;
  min-width: 240px;
  background: var(--bg-card, #1a1a24);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  padding: 8px;
}
.cadence-picker-search {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  margin-bottom: 6px;
}
.cadence-picker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
}
.cadence-picker-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.cadence-picker-item button:hover { background: rgba(73,206,244,0.08); }
.cadence-picker-empty {
  padding: 8px 10px;
  color: var(--text-dim);
  font-size: 12px;
}

/* Conflict modal — radio option rows with title + description. */
.conflict-option {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  align-items: flex-start;
}
.conflict-option:has(input:checked) {
  border-color: var(--accent-cyan);
  background: rgba(73,206,244,0.06);
}
.conflict-option input { margin-top: 3px; }
.conflict-option-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.conflict-option-desc {
  font-size: 12px;
  color: var(--text-muted);
}


/* ═══════════════════════════════════════════════
   Infinite scroll + filter toolbar (TEN-61)
   ═══════════════════════════════════════════════ */

/* Search input + sort dropdown above the table. Low-chrome so the
   filter pills row stays the dominant control. */
.contacts-toolbar {
  font-size: 12px;
}
.contacts-search-input {
  flex: 1;
  max-width: 360px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.contacts-search-input:focus {
  border-color: var(--accent-cyan);
}
.contacts-sort-select {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  margin-left: 6px;
}

/* Sentinel lives just below the last row. IntersectionObserver
   watches it with a 400px rootMargin so we start the next fetch
   before the user actually sees the bottom of the loaded rows. */
.contacts-sentinel {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 32px;
  color: var(--text-dim);
  font-size: 12px;
}
.contacts-sentinel-spinner {
  position: relative;
  padding-left: 24px;
}
.contacts-sentinel-spinner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: contacts-sentinel-spin 0.8s linear infinite;
}
.contacts-sentinel-spinner.hidden { display: none; }
.contacts-sentinel-end.hidden { display: none; }
.contacts-sentinel-end {
  color: var(--text-dim);
}
@keyframes contacts-sentinel-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}


/* ═══════════════════════════════════════════════
   Import provenance / Source section (TEN-62)
   ═══════════════════════════════════════════════ */

.source-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.source-row:last-child { border-bottom: none; }
.source-run-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}
.source-run-link:hover { text-decoration: underline; }
.source-when {
  color: var(--text-dim);
  font-size: 12px;
}


/* ═══════════════════════════════════════════════
   TEN-67 F1–F4 — Contacts table restyle
   Mapped against Figma frames 195:2 (F1), 195:118 (F2),
   195:216 (F3), 195:353 (F4).
   ═══════════════════════════════════════════════ */

:root {
  --accent-purple: #a78bfa;
  --accent-purple-soft: rgba(167, 139, 250, 0.12);
  --banner-info-bg: rgba(73, 206, 244, 0.08);
  --banner-info-border: rgba(73, 206, 244, 0.35);
  --banner-info-text: var(--accent-cyan);
  --banner-success-bg: rgba(0, 199, 129, 0.10);
  --banner-success-border: rgba(0, 199, 129, 0.4);
  --banner-success-text: var(--accent-green);
  --bulk-bar-bg: rgba(73, 206, 244, 0.06);
  --bulk-bar-border: rgba(73, 206, 244, 0.25);
  --row-selected-bg: rgba(73, 206, 244, 0.06);
}

/* Toolbar — F1: single-row search + "+ Add filter". Filter chips live
   inline between the search and Add-filter once they exist. */
.contacts-toolbar-v2 {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.contacts-toolbar-v2 .contacts-search-input {
  flex: 0 0 280px;
  max-width: 280px;
  height: 32px;
  padding: 0 12px;
}
.contacts-toolbar-v2 .btn-add-filter {
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.contacts-toolbar-v2 .btn-add-filter:hover { border-color: var(--accent-cyan); }

/* Card wrapper — F1/F3/F4 all render the table inside a dark card. */
.contacts-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 12px;
  overflow: hidden;
}

/* F1 table — 5 data columns + a narrow checkbox column. */
.contacts-table-v2 {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.contacts-table-v2 thead th {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.2px;
  text-align: left;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.contacts-table-v2 thead th.col-checkbox { width: 48px; padding-right: 0; }
.contacts-table-v2 thead th.col-name     { width: 28%; }
.contacts-table-v2 thead th.col-company  { width: 16%; }
.contacts-table-v2 thead th.col-status   { width: 12%; }
.contacts-table-v2 thead th.col-cadence  { width: 22%; }
.contacts-table-v2 thead th.col-progress { width: 12%; }
.contacts-table-v2 thead th.col-linkedin { width: 10%; }

.cell-linkedin a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cell-linkedin a:hover { text-decoration: underline; }
.cell-linkedin .external-arrow {
  font-size: 10px;
  opacity: 0.7;
}

.contacts-table-v2 tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.contacts-table-v2 tbody tr:last-child td { border-bottom: none; }
.contacts-table-v2 tbody tr.row-selected { background: var(--row-selected-bg); }
.contacts-table-v2 tbody tr:hover         { background: rgba(255, 255, 255, 0.02); }

/* Name cell — avatar + title over subtitle. */
.cell-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cell-name .avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(73, 206, 244, 0.14);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.cell-name .name-stack { min-width: 0; }
.cell-name .name-stack .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-name .name-stack .name a { color: inherit; text-decoration: none; }
.cell-name .name-stack .name a:hover { color: var(--accent-cyan); }
.cell-name .name-stack .subtitle {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-company, .cell-cadence, .cell-progress {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-cadence.has-value { color: var(--text-primary); }

/* Figma-accurate status pills — semantic tokens per variant. */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}
.status-pill--active    { color: var(--accent-green); background: rgba(0, 199, 129, 0.14); }
.status-pill--connected { color: var(--accent-cyan);  background: rgba(73, 206, 244, 0.14); }
.status-pill--replied   { color: var(--accent-purple); background: var(--accent-purple-soft); }
.status-pill--queued,
.status-pill--pending   { color: #8f93ad; background: rgba(143, 147, 173, 0.14); }
.status-pill--paused    { color: var(--accent-amber); background: rgba(255, 170, 0, 0.12); }
.status-pill--bounced,
.status-pill--failed    { color: var(--accent-red); background: rgba(255, 68, 68, 0.14); }
.status-pill--completed { color: var(--accent-cyan); background: rgba(73, 206, 244, 0.14); }

/* Checkbox affordance — F2 spec: subtle on every row, bright on
   hover / checked / indeterminate. accent-color gets native indeterminate. */
td.col-checkbox, th.col-checkbox {
  width: 48px;
  padding-right: 0;
  text-align: center;
}
.contacts-table-v2 input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent-cyan);
  opacity: 0.55;
  transition: opacity 0.12s ease;
}
.contacts-table-v2 tbody tr:hover input[type="checkbox"],
.contacts-table-v2 input[type="checkbox"]:checked,
.contacts-table-v2 input[type="checkbox"]:indeterminate,
.contacts-table-v2 thead input[type="checkbox"] {
  opacity: 1;
}

/* F3 strip — cyan-tinted "N on this page selected". */
.bulk-select-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--banner-info-bg);
  border: 1px solid var(--banner-info-border);
  font-size: 13px;
  color: var(--text-primary);
}
.bulk-select-strip.hidden { display: none; }
.bulk-select-strip .strip-link {
  color: var(--banner-info-text);
  cursor: pointer;
  font-weight: 500;
  margin-left: auto;
  margin-right: 12px;
}
.bulk-select-strip .strip-link:hover { text-decoration: underline; }
.bulk-select-strip .strip-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.bulk-select-strip .strip-close:hover { color: var(--text-primary); }

/* F4 strip — green-tinted "N matching selected". */
.bulk-select-strip--scoped {
  background: var(--banner-success-bg);
  border-color: var(--banner-success-border);
}
.bulk-select-strip--scoped .strip-link { color: var(--banner-success-text); }

/* F4 bulk action bar — richer than the TEN-60 MVP. Only "Add to
   cadence" is wired today; the others render disabled so users see
   the affordance. */
.bulk-action-bar-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--bulk-bar-bg);
  border: 1px solid var(--bulk-bar-border);
}
.bulk-action-bar-v2.hidden { display: none; }
.bulk-action-bar-v2 .bar-count-stack {
  display: flex;
  flex-direction: column;
  margin-right: 12px;
  min-width: 120px;
}
.bulk-action-bar-v2 .bar-count-primary {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.bulk-action-bar-v2 .bar-count-sub {
  font-size: 11px;
  color: var(--text-dim);
}
.bulk-action-bar-v2 .bar-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
}
.bulk-action-bar-v2 .bar-btn:hover { border-color: var(--accent-cyan); }
.bulk-action-bar-v2 .bar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bulk-action-bar-v2 .bar-btn:disabled:hover { border-color: var(--border); }
.bulk-action-bar-v2 .bar-btn--primary {
  background: var(--accent-cyan);
  color: #0d0d1a;
  border-color: var(--accent-cyan);
  font-weight: 600;
}
.bulk-action-bar-v2 .bar-btn--primary:hover { filter: brightness(1.08); }
.bulk-action-bar-v2 .bar-btn--danger { color: var(--accent-red); }
.bulk-action-bar-v2 .bar-btn--danger:hover { border-color: var(--accent-red); }
.bulk-action-bar-v2 .bar-cancel {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
}
.bulk-action-bar-v2 .bar-cancel:hover { color: var(--text-primary); }

/* Subtitle colouring when a selection is active. */
.contacts-subtitle.selection-active { color: var(--accent-cyan); }

/* ═══════════════════════════════════════════════
   TEN-66 — Filter bar (field picker, editors, chip stack)
   Figma frames 205:2 (F1) · 205:30 (F2) · 205:80 (F3) · 205:216 (F4)
   Semantic split: filter UI uses ACCENT-GREEN, bulk-selection stays
   cyan — keeps the two feature families visually distinct.
   ═══════════════════════════════════════════════ */

/* F4 inline chip stack — lives between search and "+ Add filter" in
   the toolbar. Wraps to a new row once it overflows the toolbar width
   (F4 spec). Hidden when empty so the baseline F1 layout is tight. */
.contacts-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  row-gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.contacts-filter-chips.hidden { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 199, 129, 0.10);
  border: 1px solid rgba(0, 199, 129, 0.35);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-chip .filter-chip-remove {
  background: transparent;
  border: none;
  color: var(--accent-green);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
  line-height: 1;
}
.filter-chip .filter-chip-remove:hover { opacity: 1; }

.filter-chip-clear-all {
  background: transparent;
  border: none;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 6px;
  height: 26px;
  opacity: 0.85;
}
.filter-chip-clear-all:hover { opacity: 1; }

/* F4 result line — sits directly under the toolbar when any filter is
   active. Quiet typography; never competes with chips for attention. */
.contacts-result-line {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 4px 0;
  margin-top: -6px;
}
.contacts-result-line.hidden { display: none; }

/* F2 — field picker popover (the "+ Add filter" menu).
   Frame 205:30. Sits below the Add-filter button, searchable list of
   filter fields grouped under a COMMON section header. */
.filter-field-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  width: 300px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px;
  font-size: 12px;
}
.filter-picker-search {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  margin-bottom: 8px;
  outline: none;
}
.filter-picker-search:focus { border-color: var(--accent-green); }
.filter-picker-section {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  padding: 6px 6px 4px;
}
.filter-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.filter-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.filter-picker-item:hover { background: rgba(0, 199, 129, 0.08); }
.filter-picker-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.filter-picker-item.disabled:hover { background: transparent; }
.filter-picker-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--accent-green);
}
.filter-picker-text { min-width: 0; }
.filter-picker-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.filter-picker-desc {
  font-size: 11px;
  color: var(--text-dim);
}
.filter-picker-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* F3 — per-field editor popover. Same shell for every editor variant
   (status checkboxes, cadence checkboxes, fuzzy text, radio). */
.filter-editor-popover-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  width: 280px;
  max-height: 440px;
  overflow-y: auto;
  z-index: 1000;
  padding: 12px;
}
.filter-editor-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
.filter-editor-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: 4px;
}
.filter-editor-check-row:hover { background: rgba(0, 199, 129, 0.06); }
.filter-editor-check-row input[type="checkbox"] {
  accent-color: var(--accent-green);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.filter-editor-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
}
.filter-editor-radio input[type="radio"] {
  accent-color: var(--accent-green);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.filter-editor-input {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
}
.filter-editor-input:focus { border-color: var(--accent-green); }
.filter-editor-empty {
  padding: 12px 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.filter-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.filter-editor-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
}
.filter-editor-clear:hover { color: var(--text-primary); }
.filter-editor-apply {
  background: var(--accent-green);
  border: 1px solid var(--accent-green);
  color: #0d0d1a;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
}
.filter-editor-apply:hover { filter: brightness(1.08); }

/* ═══════════════════════════════════════════════
   Bulk-Add Picker Modal (TEN-65)
   ═══════════════════════════════════════════════ */
.bulk-add-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.bulk-add-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 720px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.bulk-add-picker-header {
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.bulk-add-picker-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bulk-add-picker-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.bulk-add-picker-close:hover { color: var(--text-primary); }
.bulk-add-picker-search {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: inherit;
  margin-bottom: 12px;
}
.bulk-add-picker-search::placeholder { color: var(--text-dim); }
.bulk-add-picker-search:focus { outline: none; border-color: var(--accent-cyan); }
.bulk-add-picker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.bulk-add-picker-pills .filter-pill {
  font-size: 11px;
  padding: 4px 10px;
}
.bulk-add-picker-divider {
  height: 1px;
  background: var(--border);
  margin: 0 24px;
  flex-shrink: 0;
}
.bulk-add-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
  min-height: 200px;
}
.bulk-add-picker-summary {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 0 8px;
}
.bulk-add-picker-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-dim);
  font-size: 13px;
}
.bulk-add-picker-table {
  width: 100%;
  border-collapse: collapse;
}
.bulk-add-picker-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.bulk-add-picker-table td {
  font-size: 13px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.bulk-add-picker-table tr.row-selected {
  background: rgba(73, 206, 244, 0.06);
}
.bulk-add-picker-table .col-checkbox { width: 36px; }
.bulk-add-picker-table .text-dim { color: var(--text-dim); }
.bulk-add-picker-sentinel {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
.bulk-add-picker-strip {
  background: rgba(73, 206, 244, 0.08);
  border: 1px solid rgba(73, 206, 244, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.bulk-add-picker-strip a {
  color: var(--accent-cyan);
  cursor: pointer;
  text-decoration: underline;
}
.bulk-add-picker-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.bulk-add-picker-footer .footer-count {
  font-size: 13px;
  color: var(--text-muted);
}
.bulk-add-picker-footer .footer-actions {
  display: flex;
  gap: 10px;
}
/* Conflict modal stacked above the picker */
.bulk-add-picker-conflict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
}

/* ═══════════════════════════════════════════════
   HubSpot Sync Dashboard (TEN-55)
   ═══════════════════════════════════════════════ */
.hs-sync-dashboard {
  margin-top: 16px;
}
.hs-sync-dashboard h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.hs-sync-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.hs-error-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.hs-error-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.hs-error-table td {
  font-size: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.hs-error-table td.error-msg {
  color: var(--accent-red);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-error-table td.correlation {
  color: var(--text-dim);
  font-family: monospace;
  font-size: 11px;
}
.hs-sync-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 20px 0;
}
.hs-retry-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.stat-value.stat-error { color: var(--accent-red); }

/* ═══════════════════════════════════════════════
   Admin Page (TEN-74)
   ═══════════════════════════════════════════════ */

.admin-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.admin-main {
  flex: 1;
  min-width: 0;
}
.admin-stats {
  margin-bottom: 20px;
}

/* Name cell with online-dot + admin badge */
.admin-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-name-text {
  font-weight: 500;
  color: var(--text-primary);
}
.admin-badge-admin {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 8px;
  background: rgba(0, 199, 129, 0.15);
  color: var(--accent-green);
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.admin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.admin-dot--online {
  background: var(--accent-green);
  box-shadow: 0 0 6px rgba(0, 199, 129, 0.5);
}
.admin-dot--offline {
  background: var(--text-dim);
}

.admin-key-prefix-inline {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.admin-pill--active {
  background: var(--badge-active);
  color: var(--accent-green);
}
.admin-pill--inactive {
  background: var(--badge-skipped);
  color: var(--text-muted);
}
.admin-pill--revoked {
  background: var(--badge-failed);
  color: var(--accent-red);
}

.admin-last-seen {
  color: var(--text-muted);
  font-size: 13px;
}
.admin-last-seen--online {
  color: var(--accent-green);
}

.admin-row-action {
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.admin-row-action:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* ── Toggle switch (reused in add-user modal + detail panel) ── */

.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.admin-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}
.admin-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.admin-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--progress-track);
  border-radius: 10px;
  transition: background 0.15s;
}
.admin-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}
.admin-toggle input:checked + .admin-toggle-track {
  background: rgba(0, 199, 129, 0.3);
}
.admin-toggle input:checked + .admin-toggle-track .admin-toggle-thumb {
  transform: translateX(16px);
  background: var(--accent-green);
}
.admin-toggle-label {
  font-size: 13px;
  color: var(--text-primary);
}

/* ── Add User modal ── */

.admin-add-user-modal {
  max-width: 420px;
}
.admin-add-user-modal .form-group input,
.admin-add-user-modal .form-group select {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}
.admin-add-user-modal .form-group input:focus,
.admin-add-user-modal .form-group select:focus {
  border-color: var(--accent-green);
  outline: none;
}
.admin-modal-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-red);
  font-size: 12px;
}

/* ── Key Reveal modal ── */

.admin-key-reveal-modal {
  max-width: 460px;
  text-align: center;
}
.admin-key-reveal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(0, 199, 129, 0.15);
  color: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}
.admin-key-reveal-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 8px 0 20px;
  line-height: 1.5;
}
.admin-key-reveal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 14px;
}
.admin-key-reveal-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.admin-key-reveal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-key-reveal-value {
  flex: 1;
  color: var(--accent-green);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
}
.btn-copy {
  padding: 6px 14px;
  background: rgba(0, 199, 129, 0.15);
  color: var(--accent-green);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.btn-copy:hover {
  background: rgba(0, 199, 129, 0.25);
}
.admin-key-reveal-warning {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.3);
  border-radius: var(--radius);
  color: var(--accent-amber);
  font-size: 12px;
  text-align: left;
  line-height: 1.5;
  margin-bottom: 4px;
}
.admin-key-reveal-warning-icon {
  flex-shrink: 0;
  font-size: 14px;
}

/* ── User Detail slide-over panel ── */

.admin-detail-panel {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
}
.admin-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(73, 206, 244, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.admin-detail-identity {
  flex: 1;
  min-width: 0;
}
.admin-detail-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.admin-detail-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-detail-email {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}
.admin-detail-close {
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.admin-detail-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.admin-detail-section {
  margin-bottom: 18px;
}
.admin-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.admin-detail-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}
.admin-detail-select:focus {
  border-color: var(--accent-green);
  outline: none;
}

.admin-detail-keys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.admin-keys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-keys-empty {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 0;
}
.admin-key-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-key-item--revoked {
  opacity: 0.75;
}
.admin-key-item-main {
  flex: 1;
  min-width: 0;
}
.admin-key-item-top {
  margin-bottom: 4px;
}
.admin-key-item-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-key-prefix {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--accent-green);
}
.admin-key-prefix--revoked {
  color: var(--text-muted);
  text-decoration: line-through;
}
.admin-key-label {
  font-size: 12px;
  color: var(--text-muted);
}
.admin-key-date {
  font-size: 11px;
  color: var(--text-dim);
}
.admin-revoke-key-btn {
  padding: 4px 10px;
  background: rgba(255, 68, 68, 0.1);
  color: var(--accent-red);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}
.admin-revoke-key-btn:hover {
  background: rgba(255, 68, 68, 0.2);
}

.admin-activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.admin-activity-row--dim {
  color: var(--text-muted);
  font-size: 12px;
  padding-left: 16px;
}

.admin-detail-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.admin-detail-danger {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
}

/* ─── Drag and Drop ─── */
.step-card.drag-over {
  border-top: 3px solid var(--accent-blue, #4988F4);
}
.step-card[draggable="true"] {
  cursor: grab;
}
.step-card[draggable="true"]:active {
  cursor: grabbing;
}

/* ── Reorder Preview Modal ── */
.reorder-preview-modal {
  max-width: 540px;
  text-align: center;
}
.reorder-icon {
  font-size: 22px;
  margin-bottom: 8px;
}
.reorder-preview-modal h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}
.reorder-description {
  color: var(--text-muted, #9999ad);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
  text-align: left;
  padding: 0 10px;
}
.reorder-moved-bar {
  background: var(--surface-alt, #242436);
  border: 1px solid var(--border, #313146);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #9999ad);
  margin-bottom: 14px;
  text-align: left;
}
.reorder-contacts-toggle {
  font-size: 12px;
  font-weight: 600;
  color: #49cef4;
  cursor: pointer;
  text-align: left;
  margin-bottom: 10px;
  user-select: none;
}
.reorder-contacts-toggle .toggle-arrow {
  display: inline-block;
  transition: transform 0.15s;
}
.reorder-contacts-toggle .toggle-arrow.open {
  transform: rotate(90deg);
}
.reorder-contacts-list {
  border-top: 1px solid var(--border, #313146);
  padding-top: 10px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow-y: auto;
}
.reorder-contacts-list.hidden {
  display: none;
}
.reorder-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.reorder-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #313146;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.reorder-contact-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.reorder-contact-name {
  font-size: 13px;
  font-weight: 500;
  color: white;
}
.reorder-contact-title {
  font-size: 11px;
  color: var(--text-dim, #6e6e85);
}
.reorder-contact-step {
  font-size: 11px;
  color: var(--text-muted, #9999ad);
  white-space: nowrap;
}
.reorder-impact-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.reorder-summary-bar {
  background: var(--surface-alt, #242436);
  border: 1px solid var(--border, #313146);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 11px;
  color: var(--text-muted, #9999ad);
  margin: 10px 0 16px;
  text-align: left;
}
.reorder-actions {
  display: flex;
  gap: 16px;
}
.reorder-cancel-btn,
.reorder-apply-btn {
  flex: 1;
  height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.reorder-apply-btn {
  background: var(--accent-green, #00c781);
  color: white;
  border: none;
}
.reorder-apply-btn:hover {
  opacity: 0.9;
}

/* ── Step Editing State (TEN-77/78) ── */
.step-card.step-editing {
  background: #1a1a2e;
  border: 1px solid rgba(78, 167, 252, 0.6);
  position: relative;
}
.step-card.step-editing::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #4ea7fc;
  border-radius: 8px 0 0 8px;
}
.step-editing-label {
  font-style: italic;
  font-size: 10px;
  color: #6b6b7b;
  margin-left: 4px;
}
.step-edit-btn, .step-delete-btn {
  background: none; border: none;
  font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 4px 8px;
}
.step-edit-btn { color: #00c781; }
.step-delete-btn { color: #6b6b7b; font-size: 14px; }
.step-cancel-btn {
  background: #1e1e32; border: 1px solid #2a2a3e;
  color: white; font-size: 12px; padding: 6px 16px;
  border-radius: 6px; cursor: pointer;
}
.step-save-btn {
  background: #00c781; border: none;
  color: #0a1a14; font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: 6px; cursor: pointer;
}
.step-save-btn.disabled { background: #1a3d2c; color: #6b6b7b; pointer-events: none; }
.step-edit-body { padding: 0 16px 16px; }
.step-edit-separator { border-top: 1px solid #2a2a3e; margin: 8px 0 12px; }
.step-edit-field-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.step-edit-field-label { font-size: 12px; font-weight: 600; color: white; }
.step-edit-field-hint { font-size: 11px; color: #6b6b7b; }
.step-edit-char-count { text-align: right; font-size: 11px; color: #6b6b7b; margin-top: 4px; }

/* ── Empty State Hint ── */
.step-edit-hint {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(0, 199, 129, 0.06);
  border: 1px solid rgba(0, 199, 129, 0.3);
  border-radius: 8px; padding: 12px 14px;
  margin: 10px 0;
}
.step-edit-hint-icon { font-size: 16px; }
.step-edit-hint strong { font-size: 13px; color: white; }
.step-edit-hint-sub { font-size: 12px; color: #a0a0b0; }
.step-edit-hint code {
  background: #1e1e32; border: 1px solid #2a2a3e;
  border-radius: 3px; padding: 0 4px;
  color: #00c781; font-size: 12px; font-weight: 600;
}

/* ── Pill Editor ── */
.pill-editor {
  background: #1e1e32;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 16px;
  min-height: 200px;
  font-size: 14px;
  color: white;
  line-height: 1.7;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}
.pill-editor:focus { border-color: #4ea7fc; }
.pill-editor:empty::before {
  content: attr(data-placeholder);
  color: #6b6b7b; font-style: italic;
  pointer-events: none;
}
.var-pill {
  display: inline-block;
  background: rgba(0, 199, 129, 0.15);
  border: 1px solid #00c781;
  color: #00c781;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 22px;
  vertical-align: baseline;
  user-select: all;
  cursor: default;
}
.var-pill:hover { background: rgba(0, 199, 129, 0.22); }
.var-pill.mini {
  padding: 0 8px; font-size: 12px; line-height: 20px;
  border-radius: 5px;
}
.var-pill.missing {
  background: rgba(250, 173, 20, 0.2);
  border-color: rgba(250, 173, 20, 0.5);
  color: #faad14;
}

/* ── Slash Menu ── */
.slash-menu {
  position: absolute; z-index: 100;
  background: #1e1e32;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  width: 260px;
  padding: 6px;
}
.slash-menu-header {
  font-size: 11px; font-weight: 500;
  color: #6b6b7b;
  padding: 6px 10px 4px;
}
.slash-menu-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  font-size: 13px; font-weight: 500;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}
.slash-menu-item .slash-menu-token {
  font-size: 12px; color: #6b6b7b; font-weight: 400;
}
.slash-menu-item.active,
.slash-menu-item:hover {
  background: rgba(0, 199, 129, 0.12);
}
.slash-menu-empty {
  padding: 8px 10px;
  font-size: 12px; color: #6b6b7b;
}

/* ── Variable Bar ── */
.variable-panel {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0; margin-top: 4px;
}
.variable-panel-label {
  font-size: 12px; color: #a0a0b0; white-space: nowrap;
}
.variable-panel-label-hs {
  color: #ff8c42;
}
.variable-panel-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.variable-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(0, 199, 129, 0.1);
  border: 1px solid rgba(0, 199, 129, 0.5);
  color: #00c781;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
}
.variable-chip::before { content: '+'; font-weight: 700; }
.variable-chip:hover {
  background: rgba(0, 199, 129, 0.18);
  border-color: #00c781;
}
.variable-chip[data-var^="hs_"],
.variable-panel-label-hs + .variable-panel-chips .variable-chip {
  background: rgba(255, 140, 66, 0.1);
  border-color: rgba(255, 140, 66, 0.5);
  color: #ff8c42;
}
.variable-chip[data-var^="hs_"]:hover,
.variable-panel-label-hs + .variable-panel-chips .variable-chip:hover {
  background: rgba(255, 140, 66, 0.18);
  border-color: #ff8c42;
}
.variable-panel-hint {
  margin-left: auto;
  font-size: 11px; font-style: italic; color: #6b6b7b;
}
.variable-panel-hint .slash-key {
  display: inline-block;
  background: #1e1e32; border: 1px solid #2a2a3e;
  border-radius: 4px; padding: 0 4px;
  font-style: normal; font-weight: 600; color: #00c781;
}

/* ── Preview Panel ── */
.step-edit-preview-section { margin-top: 10px; }
.step-edit-preview-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.step-edit-preview-picker {
  background: #1e1e32; border: 1px solid #2a2a3e;
  border-radius: 4px; padding: 2px 10px;
  font-size: 11px; color: white; cursor: pointer;
}
.step-edit-preview-picker.has-warning {
  border-color: rgba(250, 173, 20, 0.5);
}
.message-preview {
  background: #1e1e32;
  border: 1px solid #2a2a3e;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px; color: white;
  min-height: 60px; line-height: 1.6;
}
.step-edit-preview-warning {
  background: rgba(250, 173, 20, 0.08);
  border: 1px solid rgba(250, 173, 20, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  display: flex; align-items: flex-start; gap: 8px;
}
.step-edit-preview-warning-icon {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(250, 173, 20, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #faad14;
  flex-shrink: 0;
}
.step-edit-preview-warning-text strong { color: #faad14; font-size: 12px; }
.step-edit-preview-warning-text span { color: #a0a0b0; font-size: 11px; }
.preview-underline {
  text-decoration: underline;
  text-decoration-color: rgba(0, 199, 129, 0.7);
  text-underline-offset: 3px;
}

/* ═══════════════════════════════════════════════
   Inbox (TEN-82c)
   ═══════════════════════════════════════════════ */

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  background: #00c781;
  color: #0a1a14;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: auto;
}

.inbox-layout {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}
.inbox-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Filters */
.inbox-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.inbox-status-pills {
  display: flex;
  gap: 6px;
}
.inbox-status-pill {
  background: #191928;
  border: 1px solid #313146;
  color: #9999ad;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-status-pill.active {
  background: rgba(0,199,129,0.12);
  border-color: #00c781;
  color: white;
}
.inbox-search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.inbox-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.4;
}
.inbox-search {
  width: 100%;
  background: #191928;
  border: 1px solid #313146;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  padding: 7px 12px 7px 32px;
  outline: none;
}
.inbox-search:focus { border-color: #00c781; }
.inbox-sort {
  background: #191928;
  border: 1px solid #313146;
  border-radius: 6px;
  color: #9999ad;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

/* List */
.inbox-list {
  flex: 1;
  overflow-y: auto;
  background: #191928;
  border: 1px solid #313146;
  border-radius: 12px;
  margin: 0 20px 20px;
}
.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 88px;
  padding: 0 16px;
  border-bottom: 1px solid #313146;
  cursor: pointer;
  transition: background 0.1s;
}
.inbox-row:hover { background: rgba(255,255,255,0.02); }
.inbox-row:focus { outline: 2px solid #00c781; outline-offset: -2px; }
.inbox-row-selected { background: rgba(0,199,129,0.06); }
.inbox-row-unread .inbox-row-name { font-weight: 700; }
.inbox-row-offline { opacity: 0.5; }

.inbox-row-accent {
  width: 3px;
  height: 48px;
  border-radius: 2px;
  background: transparent;
  flex-shrink: 0;
}
.inbox-row-accent.unread { background: #00c781; }
.inbox-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #6b6b7b;
  flex-shrink: 0;
}
.inbox-row-dot.unread {
  background: #00c781;
  border-color: #00c781;
}
.inbox-row-main {
  flex: 1;
  min-width: 0;
}
.inbox-row-name {
  font-size: 15px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-prospect-link { color: inherit; text-decoration: none; }
.inbox-prospect-link:hover { color: #49cef4; text-decoration: underline; }
.inbox-row-sub {
  font-size: 12px;
  color: #9999ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.inbox-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.inbox-owner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: white;
  border: 1px solid;
}
.inbox-hook {
  font-size: 11px;
  font-weight: 500;
  color: #49cef4;
}
.inbox-row-preview {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #a0a0b0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.inbox-chip {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.inbox-row-time {
  font-size: 11px;
  color: #6b6b7b;
}

/* Owner Filter Dropdown */
.inbox-owner-filter-wrap {
  position: relative;
}
.inbox-owner-filter-btn {
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #a0a0b0;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-owner-filter-btn:hover { border-color: #4ea7fc; color: white; }
.inbox-owner-filter-btn.active {
  border-color: #00c781;
  color: #00c781;
}
.inbox-owner-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 258px;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  z-index: 100;
  padding: 11px;
}
.inbox-owner-dropdown-search-wrap {
  margin-bottom: 8px;
}
.inbox-owner-dropdown-search {
  width: 100%;
  background: #191928;
  border: 1px solid #313146;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  color: white;
  outline: none;
  box-sizing: border-box;
}
.inbox-owner-dropdown-search::placeholder { color: #6e6e85; }
.inbox-owner-dropdown-divider {
  height: 1px;
  background: #313146;
  margin: 8px 0;
}
.inbox-owner-dropdown-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #6e6e85;
  margin-bottom: 6px;
}
.inbox-owner-dropdown-list {
  max-height: 200px;
  overflow-y: auto;
}
.inbox-owner-dropdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
}
.inbox-owner-dropdown-row:hover { background: rgba(255,255,255,0.04); }
.inbox-owner-dropdown-row.checked { background: rgba(0,199,129,0.1); }
.inbox-owner-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #47475e;
  border-radius: 3px;
  background: #191928;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: #11111e;
  font-weight: 700;
}
.inbox-owner-checkbox.checked {
  background: #00c781;
  border-color: #00c781;
}
.inbox-owner-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.inbox-owner-dropdown-name {
  font-size: 13px;
  font-weight: 500;
  color: white;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-owner-dropdown-count {
  font-size: 11px;
  color: #6e6e85;
  flex-shrink: 0;
}
.inbox-owner-dropdown-footer {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.inbox-owner-dropdown-select-all {
  background: none;
  border: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #00c781;
  cursor: pointer;
  padding: 0;
}
.inbox-owner-dropdown-clear {
  background: none;
  border: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  color: #9999ad;
  cursor: pointer;
  padding: 0;
}
.inbox-owner-dropdown-apply {
  width: 100%;
  background: #00c781;
  color: #11111e;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.inbox-owner-dropdown-apply:hover { background: #00b572; }

/* Drawer */
.inbox-drawer {
  width: 70%;
  min-width: 800px;
  max-width: 1100px;
  background: #191928;
  border-left: 1px solid #313146;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.inbox-drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #6b6b7b;
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
}
.inbox-drawer-loading {
  padding: 40px;
  color: #6b6b7b;
  text-align: center;
}
.inbox-drawer-header {
  padding: 20px 20px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.inbox-drawer-name {
  font-size: 22px;
  font-weight: 700;
  color: white;
}
.inbox-drawer-sub {
  font-size: 13px;
  color: #a0a0b0;
  margin-top: 2px;
}
.inbox-drawer-owner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.inbox-drawer-owner .inbox-owner-pill {
  width: 18px;
  height: 18px;
  font-size: 9px;
}
.inbox-drawer-owner-name {
  font-size: 12px;
  font-weight: 600;
  color: #c8c8d4;
}
.inbox-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.inbox-header-link {
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  padding: 4px 10px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #a0a0b0;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-header-link:hover {
  color: white;
  border-color: #4ea7fc;
}
.inbox-header-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Toggled / pressed state for buttons that flip a view, e.g. the Stalled
   tasks toggle in the inbox filter bar. Uses the same accent as the
   default hover so the active state reads as "you're here". */
.inbox-header-link--active {
  color: white;
  border-color: #4ea7fc;
  background: #2a2a40;
}
.inbox-header-link-danger:hover {
  color: #f44;
  border-color: #f44;
}
.inbox-drawer-divider {
  height: 1px;
  background: #313146;
  margin: 0 20px;
}
.inbox-drawer-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.inbox-msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.inbox-msg-outbound {
  margin-left: auto;
  background: rgba(0,199,129,0.14);
  border: 1px solid rgba(0,199,129,0.5);
}
.inbox-msg-inbound {
  background: #242436;
  border: 1px solid #313146;
}
.inbox-msg-header {
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 4px;
}
.inbox-msg-body {
  font-size: 13px;
  color: white;
  line-height: 18px;
  white-space: pre-wrap;
}
.inbox-msg-date {
  text-align: center;
  font-size: 11px;
  color: #6b6b7b;
  padding: 12px 0 8px;
}
/* Cockpit — manager banner */
.inbox-manager-banner {
  background: rgba(78,167,252,0.10);
  border-bottom: 1px solid rgba(78,167,252,0.25);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #4ea7fc;
}
.inbox-manager-banner-right {
  font-size: 11px;
  opacity: 0.8;
}
/* Cockpit — disconnected banner */
.inbox-disconnected-banner {
  background: rgba(250,173,20,0.12);
  border: 1px solid rgba(250,173,20,0.40);
  border-radius: 10px;
  margin: 12px 20px 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #faad14;
  gap: 12px;
}
.inbox-disconnected-banner button {
  background: rgba(250,173,20,0.18);
  border: 1px solid rgba(250,173,20,0.40);
  color: #faad14;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
/* Cockpit — prospect brief card */
.inbox-prospect-brief {
  background: #242436;
  border: 1px solid #313146;
  border-radius: 10px;
  margin: 12px 20px 0;
  overflow: hidden;
}
.inbox-prospect-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
}
.inbox-prospect-brief-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6b6b7b;
}
.inbox-prospect-brief-toggle {
  font-size: 12px;
  color: #6b6b7b;
  transition: transform 0.2s;
}
.inbox-prospect-brief-toggle.open { transform: rotate(180deg); }
.inbox-prospect-brief-body {
  padding: 0 14px 12px;
  font-size: 13px;
  color: #a0a0b0;
  line-height: 18px;
}
.inbox-prospect-brief-body a {
  color: #00c781;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
/* Cockpit — compose row (textarea + send inline) */
.inbox-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 8px 20px 0;
}
.inbox-compose-textarea {
  flex: 1;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 10px;
  padding: 10px 14px;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 20px;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 132px;
  box-sizing: border-box;
}
.inbox-compose-textarea:focus {
  border-color: #00c781;
}
.inbox-compose-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.inbox-compose-textarea::placeholder {
  color: #6b6b7b;
}
.inbox-compose-error {
  font-size: 12px;
  color: #f44;
  margin-top: 6px;
  padding: 0 4px;
}
.inbox-send-btn {
  background: #00c781;
  color: #191928;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-send-btn:disabled {
  background: #242436;
  color: #6b6b7b;
  cursor: not-allowed;
}
.inbox-send-btn:not(:disabled):hover {
  background: #00b572;
}
.inbox-send-hint {
  font-size: 11px;
  color: #6b6b7b;
}
/* Cockpit — outcome bar */
.inbox-outcome-bar {
  border-top: 1px solid #313146;
  margin: 12px 20px 0;
  padding: 12px 0 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.inbox-outcome-label {
  font-size: 13px;
  font-weight: 500;
  color: #9999ad;
  padding-top: 5px;
}
.inbox-outcome-select {
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
}
.inbox-outcome-note {
  width: 100%;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  padding: 8px 10px;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 18px;
  resize: none;
  outline: none;
  min-height: 32px;
  max-height: 72px;
  box-sizing: border-box;
}
.inbox-outcome-note::placeholder { color: #6b6b7b; }
.inbox-outcome-confirm-btn {
  background: #00c781;
  color: #191928;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.inbox-outcome-confirm-btn:hover { background: #00b572; }
/* Cockpit — pending message pill */
.inbox-msg-pending {
  font-size: 11px;
  color: #faad14;
  font-style: italic;
}
.inbox-msg-remove-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  vertical-align: middle;
}
.inbox-msg-remove-btn:hover {
  color: #f87171;
}
/* Cancel a still-queued send. Same affordance as remove, but it acts on
   LinkedIn delivery rather than on our record, so it reads as destructive. */
.inbox-msg-cancel-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  vertical-align: middle;
}
.inbox-msg-cancel-btn:hover {
  color: #f87171;
}
.inbox-msg-cancel-btn:disabled {
  cursor: default;
  opacity: 0.6;
}
.inbox-msg-retry-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
  vertical-align: middle;
}
.inbox-msg-retry-btn:hover {
  color: #00c781;
}
/* Cockpit — acted-by metadata */
.inbox-msg-acted-by {
  font-size: 10px;
  color: #6b6b7b;
  margin-top: 2px;
}
/* Cockpit — dimmed state for disconnected owner */
.inbox-cockpit-dimmed {
  opacity: 0.5;
  pointer-events: none;
}
/* Toast */
.inbox-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 8px;
  padding: 10px 18px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  animation: inbox-toast-in 0.3s ease;
}
@keyframes inbox-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Empty / Loading / Error */
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}
.inbox-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0,199,129,0.15);
  border: 2px solid #00c781;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #00c781;
  margin-bottom: 20px;
}
.inbox-empty-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.inbox-empty-sub {
  font-size: 14px;
  color: #9999ad;
  margin-bottom: 16px;
}
.inbox-empty-links a {
  color: #00c781;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.inbox-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 40px;
  text-align: center;
}
.inbox-error-icon { font-size: 32px; margin-bottom: 12px; }
.inbox-error-title { font-size: 18px; font-weight: 600; color: white; margin-bottom: 6px; }
.inbox-error-sub { font-size: 13px; color: #9999ad; margin-bottom: 16px; }

/* Skeleton shimmer */
.inbox-skeleton { pointer-events: none; }
.inbox-skel-bar {
  background: #242436;
  border-radius: 4px;
  animation: inbox-shimmer 1.5s infinite;
}
@keyframes inbox-shimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.7; }
  100% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════
   Voice Profiles Page (TEN-104)
   ═══════════════════════════════════════════════ */

.vp-stats {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}

.vp-name-text {
  font-weight: 500;
  color: var(--text-primary);
}

.vp-archetype-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Edit panel (reuses admin-detail-panel) ── */

.vp-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.vp-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

/* Make the detail panel wider for voice profile editing */
#vp-detail-panel {
  width: 480px;
}

/* ── Sections ── */

.vp-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.vp-section:last-of-type {
  border-bottom: none;
}
.vp-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 12px;
}
.vp-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* ── Fields ── */

.vp-field {
  margin-bottom: 12px;
}
.vp-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.vp-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-dim);
}
.vp-field input[type="text"],
.vp-field textarea,
.vp-field select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.vp-field input[type="text"]:focus,
.vp-field textarea:focus,
.vp-field select:focus {
  border-color: var(--accent-green);
  outline: none;
}

/* ── Exemplars ── */

.vp-exemplar-count {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.vp-exemplar-item {
  margin-bottom: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.vp-exemplar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.vp-exemplar-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.vp-exemplar-remove {
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
}
.vp-exemplar-remove:hover {
  color: var(--accent-red);
  background: rgba(255, 68, 68, 0.1);
}
.vp-exemplar-text {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 48px;
}
.vp-exemplar-text:focus {
  border-color: var(--accent-green);
  outline: none;
}

/* ── Sliders ── */

.vp-slider-group {
  margin-bottom: 14px;
}
.vp-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.vp-slider-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}
.vp-slider-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
  min-width: 28px;
  text-align: right;
}
.vp-slider-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vp-slider-min,
.vp-slider-max {
  font-size: 10px;
  color: var(--text-dim);
  min-width: 20px;
}
.vp-slider-min { text-align: right; }
.vp-slider-max { text-align: left; }

.vp-slider-input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--progress-track);
  border-radius: 2px;
  outline: none;
}
.vp-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  border: 2px solid var(--bg-card);
}
.vp-slider-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  border: 2px solid var(--bg-card);
}

/* ── Save row ── */

.vp-save-row {
  padding-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════
   Integrations Tab (Track D)
   ═══════════════════════════════════════════════ */

.int-service-card {
  padding: 16px 0;
}

.int-service-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.int-service-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.int-service-desc {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}

.int-key-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.int-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.int-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── TEN-111: Draft Panel — Figma redesign ── */
.leap-draft-panel {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
}
.leap-draft-pending { text-align: center; padding: 24px; color: #888; }
.leap-draft-pending-text { font-size: 14px; margin-bottom: 8px; }
.leap-pulse { width: 40px; height: 4px; margin: 0 auto; background: #00c781; border-radius: 2px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }
.leap-draft-error { text-align: center; padding: 20px; color: #aaa; }
.leap-draft-error p { margin: 0 0 12px; }

/* ── Card container ── */
.leap-draft-card {
  background: #1f1f30;
  border: 1px solid #00c781;
  border-radius: 12px;
  overflow: hidden;
}

/* ── Card header ── */
.leap-draft-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.leap-draft-minimize-btn {
  background: none;
  border: none;
  color: #6e6e85;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.leap-draft-minimize-btn:hover { color: #fff; }
.leap-ai-draft-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #00c781;
  color: #11111e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.leap-draft-prospect-link { font-size: 11px; color: #49cef4; text-decoration: none; white-space: nowrap; margin-left: 4px; }
.leap-draft-prospect-link:hover { text-decoration: underline; }
.leap-draft-card-meta {
  flex: 1;
  font-size: 11px;
  color: #9999ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leap-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: none;
  font-family: inherit;
  cursor: pointer;
  margin-right: 6px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.leap-stage-badge:hover {
  background: rgba(255,255,255,0.06);
}
.leap-stage-caret {
  font-size: 7px;
  opacity: 0.6;
}
.leap-howwemet {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
}
.leap-howwemet-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.55;
}
.leap-howwemet-value { opacity: 0.9; }
.leap-howwemet-empty { opacity: 0.45; font-style: italic; }
.leap-howwemet-edit {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 11px;
  color: #a78bfa;
  cursor: pointer;
}
.leap-howwemet-edit:hover { text-decoration: underline; }
.leap-howwemet-input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
}
.leap-howwemet-input:focus { outline: 1px solid #a78bfa; outline-offset: 0; }
.leap-howwemet-hint { opacity: 0.55; }
.leap-howwemet-error { color: #f87171; }
.leap-stage-dropdown {
  z-index: 10000;
  background: #1e1e2e;
  border: 1px solid #313146;
  border-radius: 8px;
  padding: 4px 0;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.leap-stage-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.leap-stage-option:hover {
  background: rgba(255,255,255,0.08);
}
.leap-stage-option--active {
  background: rgba(255,255,255,0.04);
}
.leap-stage-option-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.leap-voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid #a78bfa;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #a78bfa;
  background: none;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.leap-voice-badge:hover:not(:disabled) { background: rgba(167,139,250,0.1); }
.leap-voice-badge:disabled { opacity: 0.4; cursor: not-allowed; }
.leap-draft-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.leap-card-action-btn {
  padding: 4px 10px;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.leap-card-action-btn:hover:not(:disabled) { border-color: #00c781; color: #00c781; }
.leap-card-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Hook Picker ── */
.leap-hook-picker {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: #242436;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.leap-hook-tab {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.leap-hook-tab:hover:not(.active) { border-color: rgba(255,255,255,0.25); }
.leap-hook-tab.active {
  background: #00c781;
  border-color: #00c781;
  color: #11111e;
}
.leap-hook-tab-top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.leap-hook-tab-icon { font-size: 12px; flex-shrink: 0; }
.leap-hook-tab-label { font-weight: 700; font-size: 12px; flex: 1; }
.leap-hook-confidence-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.leap-hook-tab.active .leap-hook-confidence-badge {
  background: rgba(255,255,255,0.2);
  color: #11111e;
}
.leap-hook-tab:not(.active) .leap-hook-confidence-badge {
  background: #1f1f30;
  border: 1px solid #313146;
  color: #9999ad;
}

/* Hook category — company vs personal. Type map lives in hookCategories.ts,
   mirrored from app/services/hook_policy.py. */
.leap-hook-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.leap-hook-category-badge.personal {
  background: rgba(120, 214, 164, 0.14);
  border-color: rgba(120, 214, 164, 0.40);
  color: #7fd6a4;
}
.leap-hook-category-badge.company {
  background: rgba(78, 167, 252, 0.12);
  border-color: rgba(78, 167, 252, 0.35);
  color: #4ea7fc;
}
.leap-hook-category-badge.uncategorized {
  background: #1f1f30;
  border-color: #313146;
  color: #9999ad;
}
.leap-hook-tab.active .leap-hook-category-badge {
  background: rgba(255,255,255,0.2);
  border-color: transparent;
  color: #11111e;
}
.leap-brief-hook-mix {
  float: right;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #666;
}
.leap-hook-tab-sub {
  font-size: 10px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.leap-hook-tab-wrapper {
  position: relative;
}

.leap-hook-swap-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 2px 4px;
  border-radius: 4px;
  color: inherit;
}

.leap-hook-tab:hover .leap-hook-swap-btn,
.leap-hook-swap-btn:focus {
  opacity: 0.7;
}

.leap-hook-swap-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.leap-hook-tab.swapping {
  opacity: 0.5;
  pointer-events: none;
}

.leap-hook-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 260px;
  max-width: 320px;
  background: #1e1e2e;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 6px 0;
  margin-top: 4px;
}

.leap-hook-dropdown-section {
  padding: 4px 0;
}

.leap-hook-dropdown-section + .leap-hook-dropdown-section {
  border-top: 1px solid #333;
}

.leap-hook-dropdown-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #888;
  padding: 4px 12px;
  letter-spacing: 0.5px;
}

.leap-hook-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: none;
  color: #ddd;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.leap-hook-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.leap-hook-custom-row {
  display: flex;
  gap: 4px;
  padding: 4px 8px 6px;
}

.leap-hook-custom-input {
  flex: 1;
  background: #2a2a3c;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ddd;
  padding: 4px 8px;
  font-size: 12px;
}

.leap-hook-custom-input::placeholder {
  color: #666;
}

.leap-hook-custom-submit {
  background: #4a4a6a;
  border: none;
  border-radius: 4px;
  color: #ddd;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

.leap-hook-custom-submit:disabled {
  opacity: 0.3;
  cursor: default;
}

.leap-hook-custom-submit:not(:disabled):hover {
  background: #5a5a7a;
}

/* ── Confidence Badge (legacy, kept for potential reuse) ── */
.leap-confidence-badge { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(255,165,0,0.1); border: 1px solid rgba(255,165,0,0.3); border-radius: 6px; margin-bottom: 10px; font-size: 12px; color: #ffa500; }
.leap-confidence-icon { font-size: 14px; }

/* ── Draft Editor ── */
.leap-draft-editor-wrap {
  padding: 12px 14px;
  position: relative;
}
.leap-draft-display {
  font-size: 14px;
  line-height: 22px;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
}
.leap-draft-display.disabled { opacity: 0.5; }
.leap-draft-editor {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,199,129,0.4);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  line-height: 22px;
  resize: vertical;
  box-sizing: border-box;
}
.leap-draft-editor:focus { border-color: #00c781; outline: none; }
.leap-draft-editor:disabled { opacity: 0.5; cursor: not-allowed; }
.leap-draft-editor-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.leap-draft-edit-btn {
  padding: 3px 10px;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 20px;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.leap-draft-edit-btn:hover:not(:disabled) { border-color: #00c781; color: #00c781; }
.leap-draft-edit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.leap-draft-loading { padding: 12px 14px; }
.leap-shimmer { height: 14px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; margin-bottom: 8px; }
.leap-shimmer.short { width: 60%; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Tuning Section ── */
.leap-tuning-section {
  border-top: 1px solid #2a2a3e;
}
.leap-tuning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
  min-height: 40px;
  flex-wrap: wrap;
}
.leap-tuning-header:focus { outline: none; }
.leap-tuning-chevron { color: #6e6e85; font-size: 12px; flex-shrink: 0; }
.leap-tuning-label {
  color: #6e6e85;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.leap-tuning-archetype-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(187,135,252,0.13);
  color: #bb87fc;
  font-size: 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* Compact indicators (shown when collapsed) */
.leap-tuning-compact-indicators {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.leap-tuning-compact-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #9999ad;
}
.leap-tuning-compact-letter {
  font-weight: 600;
  color: #6e6e85;
  min-width: 8px;
}
.leap-tuning-compact-bar {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #2a2a3e;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.leap-tuning-compact-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #00c781;
  border-radius: 1px;
}
.leap-tuning-compact-pct { color: #9999ad; }
.leap-tuning-custom-tag {
  margin-left: auto;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid #313146;
  border-radius: 4px;
  color: #9999ad;
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.leap-tuning-custom-tag:hover { border-color: #00c781; color: #00c781; }
.leap-tuning-body { padding: 0 14px 12px; }
.leap-tuning-hint {
  font-size: 10px;
  color: #6e6e85;
  font-style: italic;
  margin-bottom: 10px;
  padding-top: 6px;
}

/* ── Sliders (redesigned with archetype zones) ── */
.leap-slider-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.leap-slider-item { border-radius: 6px; padding: 6px 0; }
.leap-slider-header { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.leap-slider-label { color: #fff; font-weight: 500; }
.leap-slider-current-desc { color: #9999ad; font-size: 10px; font-style: italic; }

/* Custom track */
.leap-slider-track-wrap {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}
.leap-slider-zones {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: #242436;
  overflow: visible;
}
.leap-slider-zone {
  position: absolute;
  top: 0;
  height: 100%;
}
.leap-slider-zone--out { background: rgba(237,77,77,0.2); }
.leap-slider-zone--allowed { background: rgba(0,199,129,0.13); }
.leap-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #00c781;
  border-radius: 2px 0 0 2px;
  pointer-events: none;
}
.leap-slider-tick {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 12px;
  background: #6e6e85;
  transform: translateX(-1px);
}
.leap-slider-input {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: transparent;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  z-index: 1;
}
.leap-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00c781;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0,199,129,0.2);
}
.leap-slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #00c781;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 3px rgba(0,199,129,0.2);
}
.leap-slider-input:disabled { cursor: not-allowed; opacity: 0.4; }
.leap-slider-bounds {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.leap-slider-bound { font-size: 9px; color: #6e6e85; }

/* ── Action bar at bottom of card ── */
.leap-draft-action-bar { padding: 0 14px 12px; }
.leap-draft-action-bar-divider { height: 1px; background: #2a2a3e; margin-bottom: 10px; }
.leap-draft-action-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.leap-draft-action-status { font-size: 11px; color: #6e6e85; }
.leap-draft-action-btns { display: flex; gap: 6px; align-items: center; }
.leap-action-btn {
  height: 30px;
  padding: 0 12px;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 6px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.leap-action-btn:hover:not(:disabled) { border-color: rgba(255,255,255,0.3); color: #fff; }
.leap-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.leap-send-btn {
  height: 30px;
  padding: 0 16px;
  background: #00c781;
  color: #11111e;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.leap-send-btn:hover:not(:disabled) { background: #00b370; }
.leap-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Legacy utility button classes */
.leap-brief-toggle { padding: 8px 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: #ccc; font-size: 12px; cursor: pointer; }
.leap-brief-toggle:hover { border-color: rgba(255,255,255,0.25); }
.leap-prospect-link { font-size: 12px; color: #4ea7fc; text-decoration: none; margin-left: auto; }
.leap-retry-btn { padding: 6px 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; color: #ccc; font-size: 12px; cursor: pointer; }
.leap-brief-link { padding: 6px 14px; background: transparent; border: 1px solid rgba(0,199,129,0.3); border-radius: 4px; color: #00c781; font-size: 12px; cursor: pointer; margin-top: 8px; }
.leap-send-error { margin-top: 8px; padding: 8px; background: rgba(244,68,68,0.1); border: 1px solid rgba(244,68,68,0.3); border-radius: 4px; color: #f44; font-size: 12px; display: flex; align-items: center; gap: 8px; }

/* ── TEN-112: Brief Drawer ── */
.leap-brief-drawer-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; justify-content: flex-end; }
.leap-brief-drawer { width: 40vw; min-width: 360px; max-width: 600px; background: #1a1a2e; border-left: 1px solid rgba(255,255,255,0.08); overflow-y: auto; display: flex; flex-direction: column; }
.leap-brief-drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.leap-brief-drawer-header h2 { margin: 0; font-size: 16px; color: #fff; }
.leap-brief-header-actions { display: flex; align-items: center; gap: 12px; }
.leap-brief-detail-link { font-size: 12px; color: #49cef4; text-decoration: none; white-space: nowrap; }
.leap-brief-detail-link:hover { text-decoration: underline; }
.leap-brief-close { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; padding: 0 4px; }
.leap-brief-content { padding: 16px 20px; flex: 1; }
.leap-brief-loading, .leap-brief-error { padding: 40px 20px; text-align: center; color: #888; }

/* Brief Sections */
.leap-brief-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.leap-brief-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin: 0 0 10px; }
.leap-brief-field { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.leap-brief-label { color: #888; }
.leap-brief-value { color: #eee; }
.leap-brief-value-editable { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,0.15); padding-bottom: 1px; transition: border-color 0.15s; }
.leap-brief-value-editable:hover { border-color: #00c781; }
.leap-brief-edit-icon { margin-left: 6px; font-size: 10px; color: #6e6e85; opacity: 0; transition: opacity 0.15s; }
.leap-brief-value-editable:hover .leap-brief-edit-icon { opacity: 1; }
.leap-brief-field-input { background: #242436; border: 1px solid #00c781; border-radius: 4px; padding: 2px 8px; color: #eee; font-size: 13px; font-family: inherit; outline: none; width: 60%; text-align: right; }
.leap-brief-subsection h4 { font-size: 12px; color: #aaa; margin: 10px 0 6px; }
.leap-brief-list { margin: 0; padding-left: 16px; font-size: 13px; color: #ccc; }
.leap-brief-list li { margin-bottom: 4px; }
.leap-brief-empty { color: #666; font-size: 13px; font-style: italic; }

/* Brief Signals */
.leap-brief-signal { margin-bottom: 10px; }
.leap-brief-signal-link { color: #4ea7fc; font-size: 13px; text-decoration: none; }
.leap-brief-signal-meta { font-size: 11px; color: #666; margin-left: 6px; }
.leap-brief-signal-angle { font-size: 12px; color: #aaa; margin: 2px 0 0; }

/* Brief Hooks */
.leap-brief-hooks { display: flex; flex-direction: column; gap: 8px; }
.leap-brief-hook { padding: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; cursor: grab; transition: border-color 0.15s; }
.leap-brief-hook:hover { border-color: rgba(255,255,255,0.2); }
.leap-brief-hook.flagged { opacity: 0.5; text-decoration: line-through; }
.leap-brief-hook.dragging { opacity: 0.4; }
.leap-brief-hook-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.leap-brief-hook-rank { font-size: 11px; color: #4ea7fc; font-weight: 600; }
.leap-brief-hook-type { font-size: 11px; color: #888; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 3px; }
.leap-brief-hook-flag { font-size: 10px; color: #f44; }
.leap-brief-hook-text { font-size: 13px; color: #eee; margin: 0 0 4px; }
.leap-brief-hook-evidence { font-size: 12px; color: #888; margin: 0; }
.leap-brief-hook-source { margin-top: 4px; }
.leap-brief-hook-source a { font-size: 11px; color: #4ea7fc; text-decoration: none; }
.leap-brief-hook-questions { font-size: 12px; color: #aaa; margin: 6px 0 0; padding-left: 16px; }

/* Brief Confidence */
.leap-brief-confidence-score { text-align: center; margin-bottom: 12px; }
.leap-confidence-number { font-size: 32px; font-weight: 600; color: #4ea7fc; }
.leap-confidence-number.low { color: #ffa500; }
.leap-brief-confidence-signals { display: flex; flex-direction: column; gap: 4px; }
.leap-brief-signal-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.leap-brief-signal-row span:first-child { color: #888; }
.leap-brief-signal-row span:last-child { color: #ccc; }
.leap-brief-confidence-reasons { margin-top: 10px; }
.leap-brief-confidence-reasons h4 { font-size: 12px; color: #ffa500; margin: 0 0 6px; }
.leap-brief-confidence-reasons li { font-size: 12px; color: #aaa; margin-bottom: 3px; }

/* Brief Actions */
.leap-brief-actions { display: flex; gap: 8px; padding: 16px 0; }
.leap-redistill-btn { flex: 1; padding: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; color: #ccc; font-size: 13px; cursor: pointer; }
.leap-redistill-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.leap-approve-btn { flex: 1; padding: 10px; background: rgba(0,199,129,0.12); border: 1px solid rgba(0,199,129,0.3); border-radius: 6px; color: #00c781; font-size: 13px; cursor: pointer; }
.leap-approve-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.leap-brief-approved-badge { display: inline-block; padding: 4px 10px; background: rgba(0,199,129,0.12); border: 1px solid rgba(0,199,129,0.3); border-radius: 4px; color: #00c781; font-size: 11px; margin-bottom: 12px; }
.leap-brief-toast { padding: 8px 12px; background: rgba(244,68,68,0.1); border: 1px solid rgba(244,68,68,0.3); border-radius: 4px; color: #f44; font-size: 12px; margin: 8px 20px; }

/* ── Approval Queue (TEN-142) ── */
.aq-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.aq-card { background: #191928; border: 1px solid #313146; border-radius: 10px; padding: 16px 20px; transition: opacity 0.25s ease, transform 0.25s ease; }
.aq-card:hover { background: #242436; }
.aq-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.aq-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.aq-time { font-size: 12px; color: #6e6e85; }
.aq-card-title { font-size: 14px; font-weight: 500; color: #fff; line-height: 1.4; margin-bottom: 4px; }
.aq-card-subtitle { font-size: 13px; color: #9999b2; margin-bottom: 6px; }
.aq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.aq-chip { display: inline-block; padding: 2px 8px; border: 1px solid; border-radius: 12px; font-size: 11px; font-weight: 500; background: transparent; }
.aq-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.aq-meta { display: flex; align-items: center; gap: 10px; }
.aq-meta-text { font-size: 12px; color: #6e6e85; }
.aq-conv-link { font-size: 12px; color: var(--accent-cyan); text-decoration: none; }
.aq-conv-link:hover { text-decoration: underline; }
.aq-actions { display: flex; gap: 8px; }
.aq-approve-btn { padding: 6px 14px; background: rgba(0,199,129,0.12); border: 1px solid #00C781; border-radius: 6px; color: #00C781; font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.aq-approve-btn:hover { background: rgba(0,199,129,0.22); }
.aq-approve-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.aq-reject-btn { padding: 6px 14px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #ed4d4d; font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.aq-reject-btn:hover { background: rgba(237,77,77,0.1); }
.aq-reject-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Caps & Limits Page ── */

.caps-layout {
  max-width: 1100px;
  margin: 0 auto;
}

.caps-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.caps-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.caps-summary-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.caps-summary-value {
  font-size: 28px;
  font-weight: 700;
  margin: 4px 0;
}

.caps-summary-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.caps-summary-breakdown {
  font-size: 13px;
  font-weight: 500;
  margin: 2px 0;
}

.caps-breakdown-sent {
  font-weight: 600;
}

.caps-breakdown-queued {
  color: var(--text-secondary);
}

.caps-breakdown-sep {
  margin: 0 6px;
  color: var(--text-muted);
}

.caps-global-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.caps-global-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.caps-global-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.caps-global-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.caps-global-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.caps-global-field-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.caps-global-field-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.caps-global-actions {
  display: flex;
  justify-content: flex-end;
}

.caps-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.caps-input-group input[type="number"] {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  text-align: right;
}

.caps-input-group input[type="number"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.caps-input-suffix {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.caps-users-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.caps-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.caps-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.caps-user-header b {
  font-size: 14px;
}

.caps-badge {
  font-size: 11px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
}

.caps-badge--warmup {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.caps-badge--full {
  color: var(--accent-green);
  background: rgba(74, 222, 128, 0.12);
}

.caps-badge--cooldown {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

/* TEN-215: per-user temporary pause — stronger red than cooldown to signal
   that ALL outbound is stopped (not just halved). */
.caps-badge--paused {
  color: #fff;
  background: #dc2626;
  font-weight: 600;
}

/* TEN-214 acceptance-throttle badges. 'half' (rate <30%) is amber to match the
   warmup badge — both halve the daily cap. 'pause_invites' (rate <15%) uses
   the same strong red as paused since it also blocks new outbound. */
.caps-badge--throttle-half {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.caps-badge--throttle-pause {
  color: #fff;
  background: #dc2626;
  font-weight: 600;
}

.caps-acceptance-rate {
  font-size: 12px;
  color: var(--text-secondary);
  margin: -4px 0 8px;
}

/* "Update" button beside each user's accept-rate line. Uses the shared
   .btn btn-outline btn-sm styling — this rule only adjusts vertical
   alignment so the button sits inline with the rate text. */
.caps-update-btn {
  vertical-align: middle;
  margin-left: 4px;
}

.caps-action-row {
  margin-bottom: 8px;
}

.caps-action-row:last-child {
  margin-bottom: 0;
}

.caps-action-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}

.caps-action-label {
  color: var(--text-secondary);
}

.caps-muted {
  color: var(--text-muted);
}

.caps-tick {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #fff;
  border-radius: 1px;
  opacity: 0.5;
}

.caps-bar-note {
  font-size: 10px;
  margin-top: 2px;
}

/* Inline tag for connection rows when acceptance_throttle=pause_invites.
   Mirrors the .caps-badge--throttle-pause header badge so the daily row
   visibly carries the same "blocked" signal. Smaller + uppercased to fit
   inline with the cap text. */
.caps-paused-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  background: #dc2626;
  border-radius: 3px;
  vertical-align: 1px;
}

/* Edit form */
.caps-edit-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
}

.caps-edit-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.caps-edit-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.caps-edit-tab--active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

.caps-edit-tab:hover {
  color: var(--text-primary);
}

.caps-edit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.caps-edit-row label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.caps-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}


/* ─── ICPs Tab (legacy; kept in case Settings tab returns) ─── */

.icps-pane {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1100px;
}

/* ─── ICPs Standalone Page ─── */

.icps-page {
  padding: 24px 32px;
  max-width: none;
}

.icps-page-header {
  margin-bottom: 20px;
}

.icps-page-header h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.icps-page-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.icps-page-pane {
  display: grid;
  grid-template-columns: 260px minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1280px) {
  .icps-page-pane {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .icps-test-panel {
    grid-column: 1 / -1;
  }
}

.icps-test-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.icps-test-panel h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.icps-test-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icp-test-mode-toggle {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.icp-test-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.icp-test-url-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

.icp-test-url-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.icp-test-search {
  position: relative;
}

.icp-test-search input[type="search"] {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

#icp-test-search-results {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

#icp-test-search-results:empty {
  border: none;
  background: transparent;
}

#icp-test-search-results li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#icp-test-search-results li:last-child {
  border-bottom: none;
}

#icp-test-search-results li:hover {
  background: var(--bg-row-alt);
}

#icp-test-search-results li strong {
  color: var(--text-primary);
}

.icp-test-meta {
  color: var(--text-muted);
  font-size: 11px;
}

.icp-test-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
}

.icp-test-selected strong {
  color: var(--text-primary);
  display: block;
}

.icp-test-url {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icp-test-verdict {
  padding: 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.icp-test-verdict.qualified {
  background: rgba(0, 199, 129, 0.08);
  border-color: var(--accent-green);
}

.icp-test-verdict.disqualified {
  background: rgba(255, 68, 68, 0.08);
  border-color: var(--accent-red);
}

.icp-test-verdict-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.icp-test-verdict-reason {
  color: var(--text-primary);
  font-size: 12px;
}

.icp-test-verdict-stats {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 6px;
}

.icp-test-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.icp-test-row {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.icp-test-row.good {
  border-left: 3px solid var(--accent-green);
}

.icp-test-row.bad {
  border-left: 3px solid var(--accent-red);
}

.icp-test-row-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.icp-test-kind {
  display: inline-block;
  width: 18px;
  height: 18px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  border-radius: 4px;
  color: var(--text-primary);
}

.icp-test-kind.qualifier { background: var(--accent-cyan); color: #000; }
.icp-test-kind.disqualifier { background: var(--accent-amber); color: #000; }

.icp-test-mh, .icp-test-nh {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 3px;
}

.icp-test-mh {
  background: var(--accent-red);
  color: #fff;
}

.icp-test-nh {
  background: var(--border);
  color: var(--text-muted);
}

.icp-test-answer {
  margin-left: auto;
  font-weight: 700;
  font-size: 11px;
}

.icp-test-answer.yes { color: var(--accent-green); }
.icp-test-answer.no { color: var(--text-muted); }

.icp-test-question {
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.icp-test-rationale {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

.icps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.icps-list > #icp-new-btn {
  align-self: flex-start;
}

#icp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#icp-list .icp-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#icp-list .icp-row:hover {
  border-color: var(--text-muted);
}

#icp-list .icp-row.selected {
  border-color: var(--accent-green);
  background: rgba(0, 199, 129, 0.08);
}

#icp-list .icp-row strong {
  font-size: 13px;
  color: var(--text-primary);
}

#icp-list .icp-meta {
  font-size: 11px;
  color: var(--text-dim);
}

#icp-list .icp-shared-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 4px;
}

.icp-readonly-note {
  font-size: 12px;
  align-self: center;
  margin-left: 4px;
}

.icps-editor {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}

.icps-editor > p.muted {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.icps-editor > h4 {
  margin: 6px 0 -4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.icps-editor > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.icps-editor > label > input[type="text"],
.icps-editor > label > input:not([type]),
.icps-editor > label > textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.icps-editor > label > textarea {
  min-height: 60px;
  resize: vertical;
}

.icps-editor > label:has(input[type="number"]) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.icps-editor input[type="number"] {
  width: 70px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  text-transform: none;
}

.icp-q-row,
.icp-d-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icp-q-row + .icp-q-row,
.icp-d-row + .icp-d-row {
  margin-top: 6px;
}

.icp-q-row .q-text,
.icp-d-row .d-text {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

.icp-q-row .q-text::placeholder,
.icp-d-row .d-text::placeholder {
  color: var(--text-dim);
}

.icp-q-row > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.icp-q-row .q-remove,
.icp-d-row .d-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.icp-q-row .q-remove:hover,
.icp-d-row .d-remove:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.icps-editor #icp-add-qualifier,
.icps-editor #icp-add-disqualifier {
  align-self: flex-start;
}

.icp-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ─── Prospecting step config (Cadence builder) ─── */

#new-step-fields .icp-mode-toggle,
.step-edit-form .icp-mode-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

#new-icp-library-box select,
#new-icp-inline-box input,
#new-icp-inline-box textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

#new-icp-inline-box textarea {
  resize: vertical;
}

#new-icp-inline-box label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── ICP bulk-test panel ─── */
.icp-panel-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.icp-panel-tab { background: none; border: none; padding: 8px 12px; font-size: 13px; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; }
.icp-panel-tab.active { color: var(--text-primary); border-bottom-color: var(--accent-amber, #ffaa00); }
.icp-bulk-builder { margin: 10px 0; }
.icp-bulk-filters { display: flex; gap: 6px; margin: 6px 0; }
.icp-bulk-search-results, #icp-bulk-search-results, #icp-bulk-selected-list { list-style: none; padding: 0; margin: 6px 0; max-height: 220px; overflow: auto; }
#icp-bulk-search-results li, #icp-bulk-selected-list li { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border-radius: 4px; font-size: 13px; }
#icp-bulk-search-results li:hover { background: var(--bg-row, rgba(255,255,255,0.03)); }
.icp-bulk-selected-head { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.icp-bulk-table-wrap { overflow-x: auto; margin-top: 8px; }
.icp-bulk-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.icp-bulk-table th, .icp-bulk-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.icp-bulk-table td.good, .icp-bulk-table .good { color: var(--accent-green, #4caf50); }
.icp-bulk-table td.bad, .icp-bulk-table .bad { color: var(--accent-red, #ff4444); }
.icp-bulk-pending { color: var(--text-dim); }
.icp-bulk-err { color: var(--accent-amber, #ffaa00); }
.icp-bulk-changed { color: var(--accent-amber, #ffaa00); font-weight: 600; }
.icp-bulk-stale { background: rgba(255,170,0,0.12); color: var(--accent-amber, #ffaa00); padding: 6px 10px; border-radius: 6px; font-size: 12px; margin-bottom: 8px; }
.icp-bulk-progress { font-size: 12px; color: var(--text-dim); margin: 8px 0; display: flex; gap: 10px; align-items: center; }
.icp-bulk-aggstats { font-size: 13px; margin: 8px 0; }
.icp-bulk-publish-hint { margin-top: 12px; }
/* Compact inline buttons for the bulk-test list rows (Add / View / Clear /
   Remove). Replaces the undefined .btn-link, which rendered as raw default
   buttons. */
.icp-bulk-ibtn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 12px; font-weight: 500; line-height: 1.4;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  background: var(--bg-elevated, rgba(255,255,255,0.05));
  border: 1px solid var(--border); color: var(--text-primary);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.icp-bulk-ibtn:hover { border-color: var(--accent-green, #00c781); color: var(--accent-green, #00c781); }
.icp-bulk-ibtn.danger:hover { border-color: var(--accent-red, #ff4444); color: var(--accent-red, #ff4444); }
.icp-bulk-ibtn:disabled { opacity: 0.55; cursor: default; color: var(--text-dim); }
.icp-bulk-ibtn:disabled:hover { border-color: var(--border); background: var(--bg-elevated, rgba(255,255,255,0.05)); }

/* Bulk-test launcher + roomy two-pane dialog + instant tooltip */
.icp-bulk-launch-note { margin-top: 8px; font-size: 12px; color: var(--accent-amber, #ffaa00); }
.icp-bulk-modal { width: 92vw; max-width: 1180px; height: 88vh; display: flex; flex-direction: column; padding: 0; }
.icp-bulk-modal-head { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.icp-bulk-modal-head h2 { margin: 0; font-size: 16px; flex: 0 1 auto; }
.icp-bulk-modal-head .icp-bulk-version { margin-left: auto; font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.icp-bulk-modal-close { background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; padding: 0 4px; }
.icp-bulk-modal-close:hover { color: var(--text-primary); }
.icp-bulk-modal-body { flex: 1; min-height: 0; overflow: hidden; padding: 16px 18px; }
.icp-bulk-panes { display: flex; gap: 18px; height: 100%; min-height: 0; }
.icp-bulk-pane-left { flex: 0 0 320px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.icp-bulk-pane-right { flex: 1; min-width: 0; overflow: auto; }
.icp-bulk-tip { position: fixed; z-index: 10000; max-width: 340px; white-space: pre-line; background: var(--bg-card, #1a1a24); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.45; box-shadow: 0 6px 24px rgba(0,0,0,0.4); pointer-events: none; display: none; }

/* ── Inbox "New message" modal ── */
.inbox-newmsg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-newmsg-modal {
  background: #1a1a28;
  border: 1px solid #313146;
  border-radius: 12px;
  padding: 20px 22px 18px;
  width: 440px;
  max-width: 94vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.inbox-newmsg-contact-chip {
  background: #242436;
  border: 1px solid #313146;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: white;
  flex-wrap: wrap;
}
.inbox-newmsg-contact-sub {
  color: #9999ad;
  font-size: 12px;
  flex: 1;
}
.inbox-newmsg-label {
  display: block;
  font-size: 12px;
  color: #9999ad;
  margin-bottom: 5px;
  font-weight: 500;
}
.inbox-newmsg-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #313146;
  background: #242436;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  box-sizing: border-box;
  cursor: pointer;
  margin-bottom: 8px;
}
.inbox-newmsg-select:focus { outline: none; border-color: #00c781; }
.inbox-newmsg-warn {
  background: rgba(250,173,20,0.10);
  border: 1px solid rgba(250,173,20,0.35);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #faad14;
  margin-bottom: 2px;
}
.inbox-newmsg-error-text {
  font-size: 12px;
  color: #f44;
  margin-top: 6px;
  min-height: 16px;
}
.inbox-newmsg-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.inbox-newmsg-link-btn {
  background: none;
  border: none;
  color: #6b6b7b;
  font-size: 12px;
  font-family: Inter, system-ui, sans-serif;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.inbox-newmsg-link-btn:hover { color: #a0a0b0; }
.inbox-newmsg-search-input {
  width: 100%;
  box-sizing: border-box;
  background: #242436;
  border: 1px solid #313146;
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  outline: none;
  margin-bottom: 8px;
}
.inbox-newmsg-search-input:focus { border-color: #00c781; }
.inbox-newmsg-search-input::placeholder { color: #6b6b7b; }
.inbox-newmsg-results {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.inbox-newmsg-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: white;
}
.inbox-newmsg-result:hover { background: rgba(255,255,255,0.05); }
.inbox-newmsg-result-sub {
  font-size: 11px;
  color: #9999ad;
}
