/* vendor.css — Vendor Portal styles
   Mirrors submitter.css patterns. Uses tokens.css variables exclusively.
   Load order: tokens.css → components.css → ... → vendor.css */

/* ========== VENDOR PROPERTIES VIEW ========== */

.vendor-view {
  padding: var(--s-6) var(--s-8) var(--s-10);
  max-width: 960px;
  margin: 0 auto;
}

.vendor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-6);
}
.vendor-header-left { display: flex; align-items: baseline; gap: var(--s-3); }
.vendor-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.vendor-count {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--gray-500); background: var(--gray-100); padding: 2px 8px;
  border-radius: var(--r-full);
}

/* ========== PROPERTY CARDS GRID ========== */

.vendor-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

.vendor-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all var(--t-base);
  overflow: hidden;
  position: relative;
}
.vendor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--gray-300);
}

.vendor-card-body { padding: var(--s-5) var(--s-6); }

.vendor-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.vendor-card-address {
  font-size: 15px; font-weight: 600; color: var(--gray-800); line-height: 1.35;
}
.vendor-card-location {
  font-size: 12px; color: var(--gray-500); margin-top: var(--s-0-5);
}

/* Unread badge — positioned top-right of card */
.vendor-card-unread {
  position: absolute; top: var(--s-3); right: var(--s-3);
  min-width: 20px; height: 20px;
  background: var(--error); color: var(--white);
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--s-1-5);
  box-shadow: 0 1px 3px rgba(239,68,68,0.3);
}

/* Specs strip */
.vendor-card-specs {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.vendor-spec {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 12px; color: var(--gray-500);
}
.vendor-spec i { width: 13px; height: 13px; color: var(--gray-400); }
.vendor-spec-val { font-weight: 600; color: var(--gray-700); }
.vendor-spec-divider {
  width: 1px; height: 14px; background: var(--gray-200);
}

/* Value row */
.vendor-card-values {
  display: flex; align-items: center; gap: var(--s-5);
  margin-bottom: var(--s-3);
}
.vendor-value-item {
  display: flex; flex-direction: column; gap: var(--s-0-5);
}
.vendor-value-label {
  font-size: 11px; font-weight: 500; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.vendor-value-amount {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--gray-800);
}

/* Card footer */
.vendor-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s-3); border-top: 1px solid var(--gray-100);
}

.vendor-card-left { display: flex; align-items: center; gap: var(--s-3); }

.vendor-card-scores { display: flex; align-items: center; gap: var(--s-2); }

.vendor-card-link {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 12px; font-weight: 600; color: var(--brand); cursor: pointer;
  transition: gap var(--t-fast);
}
.vendor-card-link:hover { gap: var(--s-2); }
.vendor-card-link i { width: 14px; height: 14px; }

/* ========== STATUS BADGES ========== */

.vendor-status {
  display: inline-flex; align-items: center; padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}

/* ========== SCORE CIRCLES ========== */

.vendor-score {
  width: 32px; height: 32px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; position: relative;
  background: var(--gray-100); color: var(--gray-500);
}
.vendor-score.good { background: var(--success-wash); color: var(--success); }
.vendor-score.fair { background: var(--warning-wash); color: var(--warning); }
.vendor-score.poor { background: var(--error-wash); color: var(--error); }
.vendor-score-label {
  font-size: 9px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.03em;
  text-align: center; margin-top: var(--s-0-5);
}

.vendor-score-group {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}

/* ========== VENDOR DETAIL VIEW ========== */

.vendor-detail {
  padding: var(--s-6) var(--s-8) var(--s-10);
  max-width: 760px;
  margin: 0 auto;
}

.vendor-detail-back {
  display: inline-flex; align-items: center; gap: var(--s-1-5);
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  cursor: pointer; transition: color var(--t-fast);
  margin-bottom: var(--s-5); border: none; background: none;
  font-family: var(--font-sans);
}
.vendor-detail-back:hover { color: var(--gray-800); }
.vendor-detail-back i { width: 16px; height: 16px; }

.vendor-detail-header { margin-bottom: var(--s-6); }
.vendor-detail-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.vendor-detail-subtitle {
  font-size: 13px; color: var(--gray-500); margin-top: var(--s-1);
  display: flex; align-items: center; gap: var(--s-2);
}

/* Summary Card */
.vendor-summary {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: var(--s-5) var(--s-6);
  box-shadow: var(--shadow-xs); margin-bottom: var(--s-5);
}

.vendor-summary-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

.vendor-summary-item {
  display: flex; flex-direction: column; gap: var(--s-0-5);
}
.vendor-summary-label {
  font-size: 11px; font-weight: 500; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.vendor-summary-value {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
}
.vendor-summary-value.mono { font-family: var(--font-mono); }

.vendor-summary-scores {
  display: flex; align-items: center; gap: var(--s-4);
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--gray-100);
}

.vendor-summary-score {
  display: flex; align-items: center; gap: var(--s-2);
}
.vendor-summary-score-circle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--gray-100); color: var(--gray-500);
}
.vendor-summary-score-circle.good { background: var(--success-wash); color: var(--success); }
.vendor-summary-score-circle.fair { background: var(--warning-wash); color: var(--warning); }
.vendor-summary-score-circle.poor { background: var(--error-wash); color: var(--error); }
.vendor-summary-score-info {
  display: flex; flex-direction: column;
}
.vendor-summary-score-label {
  font-size: 12px; font-weight: 600; color: var(--gray-700);
}
.vendor-summary-score-desc {
  font-size: 11px; color: var(--gray-400);
}

/* ========== ACTION BAR ========== */

.vendor-actions {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-xs); margin-bottom: var(--s-5);
  display: flex; align-items: center; gap: var(--s-3);
}

.vendor-action-select {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--gray-700); background: var(--white);
  border: 1px solid var(--gray-300); border-radius: var(--r-md);
  padding: var(--s-2) var(--s-8) var(--s-2) var(--s-3);
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color var(--t-fast);
}
.vendor-action-select:hover { border-color: var(--gray-400); }
.vendor-action-select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.vendor-action-label {
  font-size: 12px; font-weight: 500; color: var(--gray-500);
}

.vendor-actions-right {
  margin-left: auto; display: flex; align-items: center; gap: var(--s-2);
}

/* ========== BID FORM ========== */

.vendor-bid {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-xs); margin-bottom: var(--s-5);
  animation: slideUp 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vendor-bid-header {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.vendor-bid-header i { width: 16px; height: 16px; color: var(--gray-400); }

.vendor-bid-body { padding: var(--s-5); }

.vendor-bid-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.vendor-bid-field {
  display: flex; flex-direction: column; gap: var(--s-1-5);
}
.vendor-bid-field.full { grid-column: 1 / -1; }

.vendor-bid-label {
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.2px;
}

.vendor-bid-input {
  width: 100%; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--gray-300); border-radius: var(--r-md);
  font-size: 14px; color: var(--gray-800); font-family: var(--font-sans);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box;
}
.vendor-bid-input::placeholder { color: var(--gray-400); }
.vendor-bid-input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}
textarea.vendor-bid-input { min-height: 80px; resize: vertical; line-height: 1.5; }

.vendor-bid-currency { position: relative; }
.vendor-bid-currency-prefix {
  position: absolute; left: var(--s-3); top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--gray-500); pointer-events: none;
}
.vendor-bid-currency .vendor-bid-input {
  padding-left: 28px; font-family: var(--font-mono); text-align: right;
}

.vendor-bid-actions {
  display: flex; gap: var(--s-3); margin-top: var(--s-5);
  padding-top: var(--s-4); border-top: 1px solid var(--gray-200);
}

/* ========== MESSAGE THREAD ========== */

.vendor-msg-section {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.vendor-msg-header {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.vendor-msg-header i { width: 16px; height: 16px; color: var(--gray-400); }
.vendor-msg-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--gray-500); background: var(--gray-200);
  padding: 1px 6px; border-radius: var(--r-full);
  margin-left: auto;
}

.vendor-msg-thread {
  height: 360px; overflow-y: auto;
  padding: var(--s-4) var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}

/* Empty state */
.vendor-msg-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%;
  color: var(--gray-400); text-align: center; gap: var(--s-2);
}
.vendor-msg-empty i { width: 32px; height: 32px; color: var(--gray-300); }
.vendor-msg-empty-text { font-size: 13px; }
.vendor-msg-empty-hint { font-size: 12px; color: var(--gray-400); }

/* Message bubbles */
.vendor-msg-group { display: flex; flex-direction: column; gap: var(--s-0-5); }

.vendor-msg-group--team { align-items: flex-start; }
.vendor-msg-group--vendor { align-items: flex-end; }

.vendor-msg-bubble {
  max-width: 75%; padding: var(--s-2) var(--s-3);
  font-size: 13px; line-height: 1.5; word-wrap: break-word;
}

.vendor-msg-bubble--team {
  background: var(--gray-100); color: var(--gray-700);
  border-radius: var(--s-0) var(--r-lg) var(--r-lg) var(--r-lg);
}

.vendor-msg-bubble--vendor {
  background: var(--brand); color: var(--white);
  border-radius: var(--r-lg) var(--s-0) var(--r-lg) var(--r-lg);
}

.vendor-msg-meta {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 11px; color: var(--gray-400);
  padding: 0 var(--s-1);
}
.vendor-msg-sender { font-weight: 600; color: var(--gray-500); }
.vendor-msg-time { font-family: var(--font-mono); font-size: 10px; }

/* Compose area */
.vendor-msg-compose {
  display: flex; align-items: flex-end; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.vendor-msg-input {
  flex: 1; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--gray-300); border-radius: var(--r-md);
  font-size: 13px; color: var(--gray-800); font-family: var(--font-sans);
  resize: none; min-height: 38px; max-height: 100px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box; line-height: 1.5;
}
.vendor-msg-input::placeholder { color: var(--gray-400); }
.vendor-msg-input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

.vendor-msg-send {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--brand); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
}
.vendor-msg-send:hover { background: var(--brand-dark); }
.vendor-msg-send:active { transform: scale(0.95); }
.vendor-msg-send:disabled {
  background: var(--gray-300); cursor: not-allowed;
}
.vendor-msg-send i { width: 16px; height: 16px; }

/* ========== VENDOR DETAIL SECTION HEADERS ========== */

.vendor-section {
  margin-bottom: var(--s-5);
}
.vendor-section-title {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 14px; font-weight: 600; color: var(--gray-700);
  margin-bottom: var(--s-3);
}
.vendor-section-title i { width: 16px; height: 16px; color: var(--gray-400); }

/* ========== RESPONSIVE ========== */

@media (max-width: 767px) {
  .vendor-view { padding: var(--s-4); }
  .vendor-detail { padding: var(--s-4); }

  .vendor-header { flex-direction: column; align-items: flex-start; gap: var(--s-3); }

  .vendor-card-specs { flex-wrap: wrap; gap: var(--s-2); }
  .vendor-card-top { flex-direction: column; gap: var(--s-2); }

  .vendor-summary-grid { grid-template-columns: 1fr 1fr; }
  .vendor-summary-scores { flex-direction: column; align-items: flex-start; }

  .vendor-actions { flex-direction: column; align-items: stretch; }
  .vendor-actions-right { margin-left: 0; justify-content: flex-end; }

  .vendor-bid-row { grid-template-columns: 1fr; }

  .vendor-msg-thread { height: 280px; }
  .vendor-msg-bubble { max-width: 85%; }
}


/* ========================================================================== */
/* NEW VENDOR OUTREACH SYSTEM (Phase 1)                                       */
/* Matches mockups: V1-V7 in mockups/vendors/                                 */
/* ========================================================================== */

/* Shared animations */
@keyframes vSlideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vDropdownIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vModalSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vToastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------------------------------------------------------------------------
   Shared: Custom Dropdown Component
   Used across directory, outreach, templates, picker
   --------------------------------------------------------------------------- */

.v-dropdown { position: relative; display: inline-flex; }
.v-dropdown.full { width: 100%; }
.v-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-md); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-600); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
  min-width: 130px; justify-content: space-between;
}
.v-dropdown.full .v-dropdown-trigger { width: 100%; min-width: auto; }
.v-dropdown-trigger:hover { border-color: var(--gray-300); background: var(--gray-50); }
.v-dropdown-trigger.active { border-color: var(--brand); color: var(--brand); background: var(--brand-wash); }
.v-dropdown-trigger .v-dd-icon {
  width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; transition: transform 0.2s;
}
.v-dropdown-trigger.active .v-dd-icon { color: var(--brand); }
.v-dropdown-trigger.open .v-dd-icon { transform: rotate(180deg); }
.v-dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 180px; max-height: 240px; overflow-y: auto; padding: 6px; border-radius: var(--r-md);
  background: white; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md); animation: vDropdownIn 0.15s ease both;
}
.v-dropdown.full .v-dropdown-menu { right: 0; }
.v-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm); border: none;
  background: none; width: 100%; text-align: left;
  font-size: 13px; font-weight: 500; color: var(--gray-600);
  cursor: pointer; transition: all 0.1s;
}
.v-dropdown-item:hover { background: var(--gray-50); color: var(--gray-800); }
.v-dropdown-item.selected { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
.v-dropdown-item .dd-check { width: 14px; height: 14px; color: var(--brand); margin-left: auto; flex-shrink: 0; }

/* ---------------------------------------------------------------------------
   Shared: Per-type badge colors (PML, PMP, PM, Contractor)
   --------------------------------------------------------------------------- */

.vd-type-badge, .vo-type-badge, .vp-vendor-badge, .vt-card-badge {
  display: inline-flex; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.vd-type-badge.pml, .vo-type-badge.pml, .vp-vendor-badge.pml, .vt-card-badge.pml { background: var(--brand-wash); color: var(--brand); border: 1px solid var(--brand-subtle); }
.vd-type-badge.pmp, .vo-type-badge.pmp, .vp-vendor-badge.pmp, .vt-card-badge.pmp { background: rgba(139,92,246,0.08); color: #8B5CF6; border: 1px solid rgba(139,92,246,0.15); }
.vd-type-badge.pm, .vo-type-badge.pm, .vp-vendor-badge.pm, .vt-card-badge.pm { background: rgba(249,115,22,0.08); color: #F97316; border: 1px solid rgba(249,115,22,0.15); }
.vd-type-badge.contractor, .vo-type-badge.contractor, .vp-vendor-badge.contractor, .vt-card-badge.contractor { background: rgba(59,130,246,0.08); color: #3B82F6; border: 1px solid rgba(59,130,246,0.15); }
/* Outreach tab uses slightly larger badges */
.vo-type-badge { padding: 3px 10px; border-radius: 5px; }
/* Picker uses smaller font */
.vp-vendor-badge { font-size: 10px; }

/* ---------------------------------------------------------------------------
   Shared: Custom Checkbox (for picker + outreach)
   --------------------------------------------------------------------------- */

.v-check {
  width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--gray-300);
  background: white; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; cursor: pointer;
}
.v-check.checked { background: var(--brand); border-color: var(--brand); }
.v-check.checked::after {
  content: ''; display: block; width: 9px; height: 5px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}
.v-check.disabled { background: var(--gray-200); border-color: var(--gray-300); }
.v-check.disabled::after {
  content: ''; display: block; width: 9px; height: 5px;
  border-left: 2px solid var(--gray-400); border-bottom: 2px solid var(--gray-400);
  transform: rotate(-45deg) translateY(-1px);
}

/* ---------------------------------------------------------------------------
   Shared: Modal styles
   --------------------------------------------------------------------------- */

.v-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  animation: vFadeIn 0.2s ease;
}
.v-modal {
  background: white; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: vModalSlideUp 0.3s ease; max-height: 85vh; overflow-y: auto;
}
.v-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.v-modal-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.v-modal-close {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.v-modal-close:hover { background: var(--gray-100); }
.v-modal-close i { width: 16px; height: 16px; }
.v-modal-body { padding: 20px 24px; }
.v-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 16px 24px; border-top: 1px solid var(--gray-200);
}

/* Form fields (shared across modals) */
.v-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.v-form-row.full { grid-template-columns: 1fr; }
.v-form-group { display: flex; flex-direction: column; gap: 4px; }
.v-form-group.full { grid-column: 1 / -1; }
.v-form-label {
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.v-form-label .req { color: var(--error); }
.v-form-input {
  padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-700); font-size: 13px; font-weight: 500;
  font-family: var(--font-sans); outline: none; transition: all 0.15s;
}
.v-form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.v-form-textarea {
  padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-700); font-size: 13px; font-weight: 500;
  font-family: var(--font-sans); resize: vertical; min-height: 60px; line-height: 1.5;
  outline: none; transition: all 0.15s;
}
.v-form-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* ===== Add/Edit Contact Modal v2 ===== */

/* Tabs (Manual / From GHL) */
.vcm-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border: 1px solid var(--gray-200); border-radius: var(--r-md); overflow: hidden;
}
.vcm-tab {
  flex: 1; padding: 8px 12px; font-size: 13px; font-weight: 600;
  text-align: center; cursor: pointer; transition: all var(--t-fast);
  border: none; background: var(--white); color: var(--gray-500);
}
.vcm-tab.active { background: var(--brand); color: var(--white); }
.vcm-tab:hover:not(.active) { background: var(--gray-50); }

/* Form fields */
.vcm-group { margin-bottom: 16px; }
.vcm-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--gray-600);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.vcm-label .req { color: var(--error); }
.vcm-input {
  width: 100%; padding: 8px 12px; font-size: 13px;
  font-family: var(--font-sans); color: var(--gray-700);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: var(--white); outline: none; transition: border-color var(--t-fast);
  box-sizing: border-box;
}
.vcm-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vcm-input::placeholder { color: var(--gray-400); }
.vcm-textarea { resize: vertical; min-height: 72px; }
.vcm-select {
  width: 100%; padding: 8px 12px; font-size: 13px;
  font-family: var(--font-sans); color: var(--gray-700);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: var(--white); outline: none; cursor: pointer;
  box-sizing: border-box;
}
.vcm-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* Tag/role pill input */
.vcm-pill-input {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--gray-200);
  border-radius: var(--r-md); background: var(--white); min-height: 36px;
  cursor: text; transition: border-color var(--t-fast);
}
.vcm-pill-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vcm-pill-inline {
  border: none; outline: none; font-size: 13px; font-family: var(--font-sans);
  color: var(--gray-700); flex: 1; min-width: 80px; background: transparent;
}
.vcm-pill-inline::placeholder { color: var(--gray-400); }
.vcm-pill-remove {
  background: none; border: none; cursor: pointer; display: inline-flex;
  align-items: center; margin-left: 2px; padding: 0; opacity: 0.6;
  transition: opacity var(--t-fast);
}
.vcm-pill-remove:hover { opacity: 1; }

/* Suggestions row */
.vcm-suggestions {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px;
}
.vcm-suggestion {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 12px; font-weight: 500;
  border-radius: var(--r-full); color: var(--gray-500);
  border: 1px solid var(--gray-200); background: var(--white);
  cursor: pointer; transition: all var(--t-fast);
}
.vcm-suggestion:hover { border-color: var(--brand-subtle); color: var(--brand); background: var(--brand-wash); }
.vcm-suggestion i { width: 12px; height: 12px; }
.vcm-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* Collapsible section */
.vcm-collapsible {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; cursor: pointer; margin-bottom: 12px;
  border-bottom: 1px solid var(--gray-100); user-select: none;
}
.vcm-collapsible-title {
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.vcm-collapsible i { width: 14px; height: 14px; color: var(--gray-400); transition: transform var(--t-fast); }
.vcm-collapsible.open i { transform: rotate(180deg); }

/* Toggle switch */
.vcm-toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  margin-bottom: 16px;
}
.vcm-toggle {
  width: 36px; height: 20px; border-radius: var(--r-full);
  background: var(--gray-300); cursor: pointer; position: relative;
  transition: background var(--t-base); flex-shrink: 0; border: none;
}
.vcm-toggle.on { background: var(--brand); }
.vcm-toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: var(--r-full);
  background: var(--white); box-shadow: var(--shadow-xs);
  transition: transform var(--t-base); pointer-events: none;
}
.vcm-toggle.on .vcm-toggle-knob { transform: translateX(16px); }
.vcm-toggle-info { flex: 1; }
.vcm-toggle-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.vcm-toggle-desc { font-size: 11px; color: var(--gray-400); margin-top: 1px; }

/* From GHL tab placeholder */
.vcm-ghl-placeholder {
  text-align: center; padding: 40px 20px; color: var(--gray-500);
}
.vcm-ghl-placeholder i { width: 40px; height: 40px; color: var(--gray-300); margin-bottom: 12px; }
.vcm-ghl-placeholder h3 { font-size: 15px; font-weight: 600; color: var(--gray-700); margin: 0 0 6px; }
.vcm-ghl-placeholder p { font-size: 13px; margin: 0 0 16px; line-height: 1.5; }

/* ===== VFM v2 — Vendor Form Modal (horizontal row pattern) ===== */

/* Modal card (replaces v-modal for vendor form) */
.vfm {
  position: relative; z-index: 210;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 540px; max-width: 100%;
  display: flex; flex-direction: column;
  max-height: 86vh;
  animation: vfmRise 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes vfmRise {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.vfm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.vfm-head-left { display: flex; align-items: center; gap: 10px; }
.vfm-head-icon {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--brand-wash);
  display: flex; align-items: center; justify-content: center;
}
.vfm-head-icon i { width: 16px; height: 16px; color: var(--brand); }
.vfm-head-text h3 {
  font-size: 15px; font-weight: 600; color: var(--gray-900);
  letter-spacing: -0.2px;
  display: flex; align-items: center; gap: 7px;
  margin: 0;
}
.vfm-head-text p {
  font-size: 11.5px; color: var(--gray-400);
  margin: 2px 0 0;
}
.vfm-ghl-badge {
  font-family: var(--font-mono); font-size: 8px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 7px; border-radius: var(--r-xs);
  background: var(--brand-wash); color: var(--brand);
}
.vfm-close {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); transition: all 0.15s;
}
.vfm-close:hover { background: var(--gray-100); color: var(--gray-600); }
.vfm-close i { width: 15px; height: 15px; }

/* Body */
.vfm-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  min-height: 0;
}
.vfm-body::-webkit-scrollbar { width: 4px; }
.vfm-body::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

/* (pop-vis removed — popovers scroll into view instead of escaping overflow) */

/* Footer */
.vfm-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  flex-shrink: 0;
}
.vfm-foot-left { display: flex; gap: 6px; }
.vfm-foot-right { display: flex; gap: 6px; }

/* VFM buttons */
.vfm-btn-ghost {
  padding: 7px 14px; border-radius: var(--r-md);
  border: 1px solid var(--gray-200); background: var(--white);
  font-size: 12px; font-weight: 500; font-family: var(--font-sans);
  color: var(--gray-600); cursor: pointer; transition: all 0.15s;
}
.vfm-btn-ghost:hover { border-color: var(--gray-300); background: var(--gray-50); }
.vfm-btn-brand {
  padding: 7px 16px; border-radius: var(--r-md); border: none;
  background: var(--brand); color: var(--white);
  font-size: 12px; font-weight: 500; font-family: var(--font-sans);
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.vfm-btn-brand:hover { background: var(--brand-dark); }
.vfm-btn-brand:disabled { background: var(--gray-200); color: var(--gray-400); cursor: default; }
.vfm-btn-brand i { width: 13px; height: 13px; }
.vfm-btn-danger {
  padding: 7px 14px; border-radius: var(--r-md);
  border: 1px solid rgba(239,68,68,0.15); background: rgba(239,68,68,0.06);
  font-size: 12px; font-weight: 500; font-family: var(--font-sans);
  color: #DC2626; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.vfm-btn-danger:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.25); }
.vfm-btn-danger i { width: 13px; height: 13px; }

/* Info banner */
.vfm-banner {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 22px;
  font-size: 11.5px; line-height: 1.4;
}
.vfm-banner i { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.vfm-banner.is-info {
  background: rgba(8,145,178,0.06); color: #0E7490;
  border-bottom: 1px solid rgba(8,145,178,0.15);
}
.vfm-banner.is-info i { color: #0891B2; }

/* ── Form rows ── */
.vfm-row {
  display: flex; align-items: center; gap: 0;
  padding: 0 22px;
  min-height: 38px;
  border-bottom: 1px solid var(--gray-100);
}
.vfm-row:last-child { border-bottom: none; }
.vfm-row.picking { border-bottom-color: var(--brand); }
.vfm-row.picking .vfm-trigger .vfm-chev { transform: rotate(180deg); }
.vfm-row.locked { background: var(--gray-50); }
.vfm-row.locked .vfm-val { color: var(--gray-500); }

.vfm-label {
  font-size: 10.5px; font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  width: 74px; flex-shrink: 0;
  font-family: var(--font-sans);
}

/* Text input */
.vfm-finput {
  flex: 1; border: none; background: none;
  font-size: 12.5px; font-weight: 400; font-family: var(--font-sans);
  color: var(--gray-800); outline: none; padding: 5px 0; min-width: 0;
}
.vfm-finput::placeholder { color: var(--gray-400); }
.vfm-finput.filled { font-weight: 500; }

/* Read-only value */
.vfm-val {
  flex: 1; font-size: 12.5px; font-weight: 400; font-family: var(--font-sans);
  color: var(--gray-800); padding: 5px 0; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Lock icon */
.vfm-lock { width: 12px; height: 12px; color: var(--gray-300); flex-shrink: 0; margin-left: 4px; }

/* Textarea */
.vfm-textarea {
  flex: 1; border: none; background: none;
  font-size: 12px; line-height: 1.4; font-family: var(--font-sans);
  color: var(--gray-800); outline: none; padding: 8px 0; resize: none;
  min-height: 50px;
}
.vfm-textarea::placeholder { color: var(--gray-400); }

/* ── Field trigger ── */
.vfm-trigger {
  flex: 1; display: flex; align-items: center; gap: 6px;
  padding: 5px 0; cursor: pointer; min-width: 0;
  background: none; border: none; text-align: left;
  font-family: var(--font-sans);
  transition: all 0.15s;
}
.vfm-trigger .vfm-ft-icon { width: 14px; height: 14px; color: var(--gray-300); flex-shrink: 0; }
.vfm-trigger .vfm-ft-text {
  font-size: 12.5px; font-weight: 400; color: var(--gray-400);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vfm-trigger .vfm-chev {
  width: 12px; height: 12px; color: var(--gray-300); flex-shrink: 0;
  transition: transform 0.15s;
}
.vfm-trigger:hover .vfm-ft-text { color: var(--gray-500); }

/* Selected trigger */
.vfm-trigger.sel .vfm-ft-text { color: var(--gray-800); font-weight: 500; }
.vfm-ft-clear {
  width: 16px; height: 16px; border-radius: var(--r-xs); border: none;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); flex-shrink: 0; transition: all 0.15s;
}
.vfm-ft-clear:hover { background: rgba(239,68,68,0.08); color: #EF4444; }
.vfm-ft-clear i { width: 11px; height: 11px; }

/* ── Inline pills container ── */
.vfm-pills {
  display: flex; flex-wrap: wrap; gap: 4px; flex: 1;
  padding: 5px 0; align-items: center;
}

/* ── Priority indicator ── */
.vfm-priority-high {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; color: #EF4444;
}
.vfm-priority-high i { width: 12px; height: 12px; }
.vfm-priority-med {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; color: var(--warning);
}
.vfm-priority-med i { width: 12px; height: 12px; }

/* ── Section divider ── */
.vfm-section {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 22px 4px;
  cursor: pointer; user-select: none;
}
.vfm-section-label {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vfm-section-line { flex: 1; height: 1px; background: var(--gray-200); }
.vfm-section-chev {
  width: 10px; height: 10px; color: var(--gray-300);
  transition: transform 0.15s;
}
.vfm-section.open .vfm-section-chev { transform: rotate(180deg); }

/* ── Toggle row ── */
.vfm-toggle-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; flex: 1;
}
.vfm-toggle-track {
  width: 28px; height: 16px; border-radius: 8px;
  background: var(--gray-200); cursor: pointer;
  position: relative; transition: background 0.15s;
  flex-shrink: 0; border: none;
}
.vfm-toggle-track.on { background: var(--brand); }
.vfm-toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: white; box-shadow: var(--shadow-xs);
  transition: transform 0.15s;
}
.vfm-toggle-track.on::after { transform: translateX(12px); }
.vfm-toggle-text {
  font-size: 11.5px; line-height: 1.3; color: var(--gray-500);
}

/* ── Picker popover ── */
.vfm-popover {
  margin: 0 14px 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
  position: relative;
  animation: vfmPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.vfm-popover::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brand);
}
@keyframes vfmPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Popover search */
.vfm-pop-search {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.vfm-pop-search i { width: 14px; height: 14px; color: var(--gray-300); flex-shrink: 0; }
.vfm-pop-search input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 12.5px; font-family: var(--font-sans); color: var(--gray-800);
  min-width: 0;
}
.vfm-pop-search input::placeholder { color: var(--gray-400); }
.vfm-pop-count {
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  color: var(--gray-400);
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.3px;
}

/* Popover list */
.vfm-pop-list {
  max-height: 232px; overflow-y: auto;
  overscroll-behavior: contain;
}
.vfm-pop-list::-webkit-scrollbar { width: 3px; }
.vfm-pop-list::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

/* Multi-select item */
.vfm-pop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; cursor: pointer;
  transition: background 0.15s;
}
.vfm-pop-item:hover { background: var(--brand-wash); }
.vfm-pop-check {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid var(--gray-300); background: white;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.vfm-pop-item.checked .vfm-pop-check {
  background: var(--brand); border-color: var(--brand);
}
.vfm-pop-item.checked .vfm-pop-check i { width: 10px; height: 10px; color: white; }
.vfm-pop-item-text {
  flex: 1; font-size: 12.5px; color: var(--gray-700);
  display: flex; align-items: center; gap: 6px;
}
.vfm-pop-item-count {
  font-family: var(--font-mono); font-size: 10px; color: var(--gray-400);
  flex-shrink: 0;
}

/* Single-select item */
.vfm-pop-single {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; cursor: pointer;
  transition: background 0.15s;
}
.vfm-pop-single:hover { background: var(--brand-wash); }
.vfm-pop-single .vfm-ps-check {
  width: 14px; height: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
}
.vfm-pop-single.selected .vfm-ps-check { color: var(--brand); }
.vfm-pop-single.selected .vfm-ps-check i { width: 14px; height: 14px; }
.vfm-pop-single .vfm-ps-text {
  flex: 1; font-size: 12.5px; color: var(--gray-700);
}
.vfm-pop-single.selected .vfm-ps-text { color: var(--gray-900); font-weight: 500; }

/* Add custom hint row */
.vfm-pop-custom {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  font-size: 11.5px; color: var(--brand);
  cursor: pointer; border-top: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.vfm-pop-custom:hover { background: var(--brand-wash); }
.vfm-pop-custom i { width: 12px; height: 12px; }

/* Keyboard hints */
.vfm-pop-kbd {
  display: flex; gap: 12px; padding: 5px 14px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  font-size: 9.5px; color: var(--gray-400);
}
.vfm-pop-kbd kbd {
  display: inline-block; padding: 1px 4px; border-radius: 3px;
  background: var(--white); border: 1px solid var(--gray-200);
  font-family: var(--font-mono); font-size: 8px; font-weight: 500;
  color: var(--gray-500); margin-right: 2px;
}

/* ── Conditional card ── */
.vfm-cond {
  margin: 6px 14px 8px;
  border-radius: var(--r-lg);
  overflow: hidden;
  animation: vfmPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.vfm-cond-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: -0.1px;
}
.vfm-cond-head i { width: 13px; height: 13px; }
.vfm-cond .vfm-row { padding: 0 14px; min-height: 34px; }
.vfm-cond .vfm-label { width: 68px; font-size: 10px; }
.vfm-cond .vfm-finput,
.vfm-cond .vfm-val,
.vfm-cond .vfm-trigger .vfm-ft-text { font-size: 12px; }

/* Lender profile (blue tint) */
.vfm-cond.lender { border: 1px solid rgba(59,130,246,0.12); }
.vfm-cond.lender .vfm-cond-head { background: rgba(59,130,246,0.04); color: var(--tag-blue); }
.vfm-cond.lender .vfm-row { border-bottom-color: rgba(59,130,246,0.06); }

/* Investment profile (indigo tint) */
.vfm-cond.investor { border: 1px solid rgba(99,102,241,0.12); }
.vfm-cond.investor .vfm-cond-head { background: rgba(99,102,241,0.04); color: var(--tag-indigo); }
.vfm-cond.investor .vfm-row { border-bottom-color: rgba(99,102,241,0.06); }

/* Strategy pills */
.vfm-strat-pill {
  display: inline-flex; padding: 2px 7px; border-radius: var(--r-full);
  font-size: 10px; font-weight: 500;
  border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600);
  white-space: nowrap;
}

/* Tag pills (inline in form) */
.vfm-tag-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px 2px 2px; border-radius: var(--r-full);
  font-size: 11px; white-space: nowrap;
  border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-700);
}
.vfm-tag-pill .tp-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  margin-left: 4px;
}
.vfm-tag-pill .tp-x {
  width: 12px; height: 12px; border-radius: 2px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); margin-left: 2px;
}
.vfm-tag-pill .tp-x:hover { color: #EF4444; }
.vfm-tag-pill .tp-x i { width: 9px; height: 9px; }

/* Shared button styles */
.v-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-600); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: var(--font-sans);
}
.v-btn:hover { border-color: var(--gray-300); }
.v-btn i { width: 14px; height: 14px; }
.v-btn.primary { background: var(--brand); color: white; border-color: var(--brand); }
.v-btn.primary:hover { background: var(--brand-dark); }
.v-btn.danger { color: var(--error); }
.v-btn.danger:hover { background: var(--error-wash); border-color: var(--error); }
.v-btn:disabled, .v-btn.disabled { opacity: 0.5; pointer-events: none; }

/* ---------------------------------------------------------------------------
   Vendor Directory Page (#/vendors)
   --------------------------------------------------------------------------- */

.vd-page { padding: 24px 32px 48px; max-width: 1120px; margin: 0 auto; }
.vd-page-subtitle { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

.vd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.vd-header-left { display: flex; flex-direction: column; gap: 2px; }
.vd-header-title-row { display: flex; align-items: baseline; gap: 12px; }
.vd-title { font-size: 22px; font-weight: 700; color: var(--gray-900); margin: 0; }
.vd-count {
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-wash); padding: 2px 10px;
  border-radius: var(--r-full); font-family: var(--font-mono);
}
.vd-header-actions { display: flex; gap: 8px; }

/* Summary cards */
.vd-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.vd-summary-card {
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--gray-200); background: white;
}
.vd-summary-label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.04em; }
.vd-summary-value { font-size: 24px; font-weight: 800; color: var(--gray-900); margin-top: 4px; font-family: var(--font-mono); letter-spacing: -0.02em; }
.vd-summary-delta { font-size: 11px; font-weight: 600; margin-top: 4px; }
.vd-summary-delta.up { color: var(--success); }

/* Filter bar */
.vd-filter-bar {
  display: flex; align-items: center; gap: 12px;
}
.vd-filters-left { display: flex; align-items: center; gap: 10px; }
.vd-filter-pill-label { font-size: 11px; color: var(--gray-500); font-weight: 600; }

/* Active/All segmented toggle */
.vd-toggle {
  display: flex; gap: 2px; padding: 3px; background: var(--gray-100);
  border-radius: var(--r-md); border: 1px solid var(--gray-200); margin-left: auto;
}
.vd-toggle-btn {
  padding: 5px 12px; border-radius: 6px; border: none;
  background: transparent; color: var(--gray-500);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  font-family: var(--font-sans);
}
.vd-toggle-btn.active {
  background: white; color: var(--gray-800);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}

/* Search row — full width */
.vd-search-row { }
.vd-search-wrap { position: relative; }
.vd-search-input {
  padding: 10px 14px 10px 40px; border: 1px solid var(--gray-200); border-radius: var(--r-lg);
  font-family: var(--font-sans); font-size: 13px; color: var(--gray-700);
  background: white; width: 100%; outline: none; transition: all 0.15s;
  box-sizing: border-box;
}
.vd-search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vd-search-input::placeholder { color: var(--gray-400); }

/* Table */
.vd-table-wrap {
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: auto;
  max-width: 100%;
}
.vd-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.vd-col-cb { width: 40px; text-align: center; }
.vd-col-center { text-align: center; }
.vd-table thead th {
  padding: var(--s-3); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  text-align: left; white-space: nowrap;
}
.vd-table thead th.sortable { cursor: pointer; user-select: none; }
.vd-table thead th.sortable:hover { color: var(--gray-600); }
.vd-table thead th .sort-icon { display: inline-flex; margin-left: 4px; opacity: 0.4; }
.vd-table thead th.sorted .sort-icon { opacity: 1; color: var(--brand); }
/* Column widths — fixed layout, proportional to container */
.vd-table th:nth-child(1), .vd-table td:nth-child(1) { width: 40px; }           /* Checkbox */
.vd-table th:nth-child(2), .vd-table td:nth-child(2) { width: 17%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Contact */
.vd-table th:nth-child(3), .vd-table td:nth-child(3) { width: 12%; }            /* Roles */
.vd-table th:nth-child(4), .vd-table td:nth-child(4) { width: 14%; }            /* Tags */
.vd-table th:nth-child(5), .vd-table td:nth-child(5) { width: 24%; overflow: hidden; text-overflow: ellipsis; } /* Email */
.vd-table th:nth-child(6), .vd-table td:nth-child(6) { width: 10%; text-align: center; } /* Properties */
.vd-table th:nth-child(7), .vd-table td:nth-child(7) { width: 12%; white-space: nowrap; } /* Last Activity */
.vd-table th:nth-child(8), .vd-table td:nth-child(8) { width: 7%; text-align: center; }  /* Status */
.vd-table tbody td { padding: var(--s-3); border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.vd-table tbody tr:last-child td { border-bottom: none; }
.vd-table tbody tr { transition: background 0.1s; animation: vSlideUp 0.3s ease both; }
.vd-table tbody tr:hover { background: var(--gray-50); }
.vd-inactive-row { opacity: 0.55; }

/* Name cell (stacked name + company) */
.vd-name-cell { display: flex; flex-direction: column; gap: 1px; }
.vd-vendor-name { font-weight: 600; color: var(--gray-900); white-space: nowrap; }
.vd-table tbody tr:hover .vd-vendor-name { color: var(--brand); }
.vd-vendor-company { font-size: 11px; color: var(--gray-400); }

/* Status dot */
.vd-active-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.vd-active-dot.active { background: var(--success); }
.vd-active-dot.inactive { background: var(--gray-300); }

/* Properties count — plain mono text (matches mockup) */
.vd-prop-count {
  font-size: 13px; font-weight: 600; color: var(--gray-700);
  font-family: var(--font-mono);
}
.vd-prop-count.zero { color: var(--gray-300); }

/* Actions overflow button */
.vd-actions-btn {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.vd-actions-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.vd-actions-btn i { width: 14px; height: 14px; }

/* Pagination (inside table card) */
.vd-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--gray-200); background: var(--gray-50);
}
.vd-pagination-info { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.vd-pagination-controls { display: flex; align-items: center; gap: 4px; }
.vd-page-btn {
  min-width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 1px solid var(--gray-200); background: white; color: var(--gray-600);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
}
.vd-page-btn:hover { border-color: var(--gray-300); background: var(--gray-50); }
.vd-page-btn.active { background: var(--brand); color: white; border-color: var(--brand); }
.vd-page-btn.disabled { opacity: 0.4; pointer-events: none; }
.vd-page-btn i { width: 14px; height: 14px; }
.vd-per-page { display: flex; align-items: center; gap: 6px; }
.vd-per-page label { font-size: 12px; color: var(--gray-400); font-weight: 500; }
.vd-per-page select {
  padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-600); font-size: 12px; font-weight: 500; cursor: pointer;
}

/* Empty state */
.vd-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; text-align: center;
}
.vd-empty > svg { display: block; width: 56px; height: 56px; color: var(--gray-300); margin-bottom: 20px; }
.vd-empty i { display: block; width: 56px; height: 56px; color: var(--gray-300); margin-bottom: 20px; stroke-width: 1.2; }
.vd-empty h3 { font-size: 18px; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.vd-empty p { font-size: 13px; color: var(--gray-400); margin-bottom: 24px; max-width: 360px; line-height: 1.5; }
.vd-empty-actions { display: flex; gap: 8px; }

/* CSV Import — hint tooltips */
.csv-hint-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
}
.csv-req {
  color: var(--error);
  font-size: 9px;
  font-weight: 700;
  margin-left: 1px;
}
.csv-hint-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: var(--r-full);
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: help;
  position: relative;
  flex-shrink: 0;
}
.csv-hint-trigger:hover {
  background: var(--brand-wash);
  color: var(--brand);
}
.csv-hint-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: var(--white);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.csv-hint-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--gray-800);
}
.csv-hint-trigger:hover .csv-hint-popup {
  display: block;
}

/* CSV Import — dropzone */
.vd-csv-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; border: 2px dashed var(--gray-200); border-radius: var(--r-lg);
  background: var(--gray-50); cursor: pointer; transition: all 0.2s; text-align: center;
}
.vd-csv-dropzone:hover { border-color: var(--brand); background: var(--brand-wash); }
.vd-csv-dropzone i { width: 36px; height: 36px; color: var(--gray-300); margin-bottom: 12px; }
.vd-csv-dropzone-text { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.vd-csv-dropzone-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* CSV Import — preview */
.vd-csv-preview { margin-top: 16px; }
.vd-csv-preview-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.vd-csv-preview-title { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.vd-csv-preview-count { font-size: 12px; color: var(--gray-400); }
.vd-csv-preview-table {
  width: 100%; border-collapse: collapse; border: 1px solid var(--gray-200);
  border-radius: var(--r-md); overflow: hidden; font-size: 12px;
}
.vd-csv-preview-table th {
  padding: 8px 10px; background: var(--gray-50); font-weight: 600; color: var(--gray-500);
  text-align: left; border-bottom: 1px solid var(--gray-200); font-size: 11px; text-transform: uppercase;
}
.vd-csv-preview-table td { padding: 8px 10px; border-bottom: 1px solid var(--gray-100); color: var(--gray-600); }
.vd-csv-preview-table tr.dedup { opacity: 0.5; }
.vd-csv-dedup {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px;
  background: var(--warning-wash); color: var(--warning); font-size: 10px; font-weight: 600;
}

/* CSV Import — results */
.vd-csv-results { padding: 20px; text-align: center; }
.vd-csv-results i { width: 40px; height: 40px; margin-bottom: 12px; }
.vd-csv-results h4 { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.vd-csv-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.vd-csv-stat:last-child { border-bottom: none; }
.vd-csv-stat-label { color: var(--gray-500); }
.vd-csv-stat-value { font-weight: 600; color: var(--gray-800); font-family: var(--font-mono); }
.vd-csv-stat-value.skip { color: var(--warning); }
.vd-csv-stat-value.error { color: var(--error); }

/* Legacy compat */
.vd-import-preview { max-height: 300px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: var(--r-md); }
.vd-import-error { margin-top: 12px; font-size: 13px; color: var(--error); }

/* GHL badge */
.vd-ghl-badge {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 4px;
  background: var(--brand-wash); color: var(--brand);
  border: 1px solid var(--brand-light);
  line-height: 1.4; vertical-align: middle;
  flex-shrink: 0;
}

/* GHL Import Modal — tag picker */
/* GHL modal: flex layout so header/footer stay pinned, body scrolls */
/* GHL Search Modal — flex layout with pinned header/footer */
.v-modal.vd-ghl-modal {
  display: flex; flex-direction: column; overflow: hidden;
}
.v-modal.vd-ghl-modal .v-modal-body {
  overflow-y: auto; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}

/* Search area — sticky within body */
.vd-ghl-search-area {
  position: sticky; top: 0; z-index: 2;
  background: #fff; padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

/* Filter by tag button */
.vd-ghl-filter-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 11px; font-weight: 500;
  font-family: var(--font-sans);
  color: var(--gray-500); background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 100px;
  cursor: pointer; transition: all 0.15s;
}
.vd-ghl-filter-btn:hover { background: var(--gray-100); color: var(--gray-600); }

/* Active tag filter pills */
.vd-ghl-filter-pill {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 10px; font-size: 11px; font-weight: 500;
  font-family: var(--font-sans);
  color: var(--brand); background: var(--brand-wash);
  border: 1px solid var(--brand-light); border-radius: 100px;
  cursor: pointer; transition: all 0.15s;
}
.vd-ghl-filter-pill:hover { background: #ddeeed; }

/* Tag picker dropdown */
.vd-ghl-tag-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 10;
  margin-top: 4px; min-width: 200px; max-height: 240px;
  overflow-y: auto; background: #fff;
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.vd-ghl-tag-dropdown-item {
  display: block; width: 100%; text-align: left;
  padding: 7px 12px; font-size: 12px; font-family: var(--font-sans);
  color: var(--gray-700); background: none; border: none;
  cursor: pointer; transition: background 0.1s;
}
.vd-ghl-tag-dropdown-item:hover { background: var(--gray-50); }

/* Results count bar */
.vd-ghl-results-count {
  padding: 6px 20px; font-size: 11px; font-weight: 500;
  color: var(--gray-400); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}

/* Results list */
.vd-ghl-results-list { flex: 1; overflow-y: auto; min-height: 0; }

/* Result row */
.vd-ghl-result-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background 0.1s;
}
.vd-ghl-result-row .vd-ghl-check { margin-top: 3px; }
.vd-ghl-result-row:hover { background: var(--gray-50); }
.vd-ghl-result-row:last-child { border-bottom: none; }
.vd-ghl-result-row.selected { background: var(--brand-wash); }
.vd-ghl-result-row.disabled { cursor: default; opacity: 0.7; }
.vd-ghl-result-row.disabled:hover { background: transparent; }

/* Checkbox */
.vd-ghl-check {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--gray-300); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; background: #fff;
  font-size: 11px; color: transparent;
}
.vd-ghl-check.checked {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.vd-ghl-check.added {
  background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-400);
}

/* Contact info — 3-line card layout */
.vd-ghl-result-info { flex: 1; min-width: 0; }
.vd-ghl-result-name-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.vd-ghl-result-name {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0; max-width: 70%;
}
.vd-ghl-result-sep {
  font-size: 12px; color: var(--gray-300); flex-shrink: 0;
}
.vd-ghl-result-company {
  font-size: 12px; color: var(--gray-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.vd-ghl-result-details {
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.vd-ghl-result-email {
  font-size: 12px; color: var(--gray-600);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vd-ghl-result-phone { font-size: 12px; color: var(--gray-400); white-space: nowrap; }
.vd-ghl-result-details .vd-ghl-result-sep { font-size: 11px; }

/* Tags — line 3, categorized */
.vd-ghl-result-tags {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-top: 4px;
}
.vd-ghl-result-tag {
  display: inline-block; padding: 2px 7px;
  font-size: 10px; font-weight: 500;
  color: var(--gray-500); background: var(--gray-100);
  border-radius: 100px; white-space: nowrap;
}
.vd-ghl-result-tag.role {
  color: var(--brand); background: var(--brand-wash);
  font-weight: 600;
}
.vd-ghl-result-tag.location {
  color: var(--gray-600); background: var(--gray-50);
}
.vd-ghl-result-tag-more { font-size: 10px; color: var(--gray-400); font-weight: 500; }

/* Right side: badge or status */
.vd-ghl-result-right { flex-shrink: 0; display: flex; align-items: center; }

/* Already added badge */
.vd-ghl-already-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; font-size: 11px; font-weight: 500;
  color: var(--success); background: #ecfdf5;
  border-radius: 100px; white-space: nowrap; flex-shrink: 0;
}

/* Empty/placeholder states */
.vd-ghl-empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 20px; text-align: center;
  min-height: 260px;
}

/* Success state */
.vd-ghl-success {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px; text-align: center;
}
.vd-ghl-success-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #ecfdf5; display: flex;
  align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 22px; color: var(--success);
}
.vd-ghl-success-list { margin-top: 4px; }
.vd-ghl-success-item {
  font-size: 13px; color: var(--gray-600);
  padding: 4px 0; display: flex;
  align-items: center; gap: 6px;
}

/* Spin animation for loader icons */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Pure CSS spinner — avoids Lucide orphaned SVG issues */
.vd-css-spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ---------------------------------------------------------------------------
   Outreach Sub-Tab (within property detail Vendors tab)
   --------------------------------------------------------------------------- */

/* Segmented sub-tab toggle */
.vo-sub-toggle {
  display: flex; gap: 2px; padding: 3px; background: var(--gray-100);
  border-radius: var(--r-md); border: 1px solid var(--gray-200);
}
.vo-sub-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 6px; border: none;
  background: transparent; color: var(--gray-500);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  font-family: var(--font-sans);
}
.vo-sub-btn.active {
  background: white; color: var(--gray-800);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.vo-sub-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); display: inline-block; }

/* Outreach header */
.vo-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.vo-filters { display: flex; gap: 8px; }

/* Outreach table — CSS Grid layout (matches SubTasks v2) */
.vo-table { width: 100%; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-lg); overflow: visible; box-shadow: var(--shadow-xs); }
.vo-head {
  display: grid; grid-template-columns: 40px minmax(160px, 1.5fr) 80px 130px 100px 100px 44px;
  padding: 0 var(--s-4); background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.vo-th {
  padding: var(--s-2) var(--s-3); font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  display: flex; align-items: center;
}
.vo-row {
  display: grid; grid-template-columns: 40px minmax(160px, 1.5fr) 80px 130px 100px 100px 44px;
  padding: 0 var(--s-4); align-items: center;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast);
  animation: tv2SlideUp 0.3s ease both; position: relative;
}
.vo-row:last-child { border-bottom: none; }
.vo-row:hover { background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-200); }
.vo-row.active { background: rgba(72,122,123,0.06); box-shadow: inset 3px 0 0 var(--brand); }
.vo-row.vo-sending { opacity: 0.5; pointer-events: none; }

/* Status accent border (3px left via ::before) */
.vo-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.vo-row:first-child::before { border-radius: 0; }
.vo-row.status-not_contacted::before { background: var(--gray-300); }
.vo-row.status-sent::before { background: var(--sub-assigned, #3b82f6); }
.vo-row.status-replied::before { background: var(--sub-approved); }
.vo-row.status-scheduled::before { background: #8B5CF6; }
.vo-row.status-bounced::before { background: var(--error); }
.vo-row.status-queued::before { background: var(--warning); }
.vo-row.status-draft::before { background: var(--gray-400); }
.vo-row.status-closed::before { background: var(--gray-300); }
.vo-row.status-closed { opacity: 0.65; }

/* Awaiting response hint */
.vo-awaiting-hint {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500; margin-top: 2px;
  padding: 1px 6px; border-radius: var(--r-full);
}
.vo-awaiting-hint.vendor { color: var(--info); background: rgba(59,130,246,0.08); }
.vo-awaiting-hint.us { color: var(--warning-dark, #d97706); background: rgba(245,158,11,0.08); }

/* Purpose cell */
.vo-purpose-cell { font-size: 12px; color: var(--gray-600); }

/* Table cells */
.vo-cell { padding: var(--s-3); min-width: 0; }
.vo-name-primary { font-size: 14px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vo-name-secondary { font-size: 12px; color: var(--gray-500); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vo-template-cell { font-size: 12px; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vo-sent-cell { font-family: var(--font-mono); font-size: 12px; color: var(--gray-500); }
.vo-sent-cell .empty { color: var(--gray-300); }

/* Status pills — reuses tv2-status-pill pattern */
.vo-status-pill {
  display: inline-flex; align-items: center; gap: var(--s-1); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-full);
  transition: filter 0.15s ease, box-shadow 0.15s ease; user-select: none;
}
.vo-status-pill .pill-dot { width: 6px; height: 6px; border-radius: var(--r-full); flex-shrink: 0; }
.vo-status-pill.not_contacted { background: var(--gray-100); color: var(--gray-500); }
.vo-status-pill.not_contacted .pill-dot { background: var(--gray-400); }
.vo-status-pill.sent { background: var(--info-wash, rgba(59,130,246,0.08)); color: var(--info, #3b82f6); }
.vo-status-pill.sent .pill-dot { background: var(--info, #3b82f6); }
.vo-status-pill.replied { background: var(--success-wash, rgba(16,185,129,0.08)); color: var(--success, #10b981); }
.vo-status-pill.replied .pill-dot { background: var(--success, #10b981); }
.vo-status-pill.bounced { background: var(--error-wash); color: var(--error); }
.vo-status-pill.bounced .pill-dot { background: var(--error); }
.vo-status-pill.scheduled { background: rgba(139,92,246,0.08); color: #8B5CF6; }
.vo-status-pill.scheduled .pill-dot { background: #8B5CF6; }
.vo-status-pill.queued { background: var(--warning-wash); color: var(--warning); }
.vo-status-pill.queued .pill-dot { background: var(--warning); }
.vo-status-pill.draft { background: var(--gray-100); color: var(--gray-600); }
.vo-status-pill.draft .pill-dot { background: var(--gray-400); }
.vo-status-pill.closed { background: var(--gray-100); color: var(--gray-400); }
.vo-status-pill.closed .pill-dot { background: var(--gray-300); }

/* Scheduled time (below pill) */
.vo-scheduled-hint { font-size: 10px; color: #8B5CF6; margin-top: 2px; font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════
   COLLAPSIBLE VENDOR ROWS — V3 Outreach Redesign
   Groups outreach records by vendor, expand to show thread cards
   ═══════════════════════════════════════════════════════════ */

/* Vendor block container — wraps vendor row + expandable thread panel */
.vo-vendor-block {
  border-bottom: 1px solid var(--gray-100);
}
.vo-vendor-block:last-child { border-bottom: none; }

/* Vendor row — the collapsible header */
.vo-vendor-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr 80px 1fr 40px;
  padding: 0 var(--s-4); align-items: center;
  cursor: pointer; transition: background var(--t-fast);
  animation: tv2SlideUp 0.3s ease both; position: relative;
  min-height: 56px;
}
.vo-vendor-row:hover { background: var(--gray-50); }
.vo-vendor-row.expanded { background: var(--brand-wash); }

/* Expand chevron */
.vo-expand {
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); transition: transform var(--t-fast), color var(--t-fast);
}
.vo-expand i { width: 16px; height: 16px; }
.vo-vendor-row.expanded .vo-expand { color: var(--brand); transform: rotate(0deg); }
.vo-vendor-row:not(.expanded) .vo-expand { transform: rotate(-90deg); }

/* Row checkbox for multi-select */
.vo-check { display: flex; align-items: center; justify-content: center; }
.vo-check input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand);
  margin: 0;
}

/* Vendor identity — avatar + name block */
.vo-identity { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.vo-avatar {
  width: 36px; height: 36px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--font-sans); color: var(--white);
  background: var(--brand);
}
.vo-avatar.amber { background: #F59E0B; }
.vo-avatar.indigo { background: #6366F1; }
.vo-avatar.rose { background: #F43F5E; }
.vo-avatar.sky { background: #0EA5E9; }
.vo-info { min-width: 0; }
.vo-vendor-name {
  font: 600 14px/1.3 var(--font-sans); color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vo-vendor-company {
  font: 400 12px/1.3 var(--font-sans); color: var(--gray-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}

/* Aggregate status summary in vendor row */
.vo-threads-summary { display: flex; flex-direction: column; gap: 2px; }
.vo-thread-count { font: 700 13px/1.2 var(--font-sans); color: var(--gray-800); }
.vo-thread-detail {
  font: 500 11px/1.3 var(--font-sans); color: var(--gray-500);
  display: flex; flex-wrap: wrap; gap: 2px 6px;
}
.vo-thread-detail .replied { color: var(--success); }
.vo-thread-detail .awaiting { color: var(--info); }
.vo-thread-detail .draft-count { color: var(--gray-500); }

/* Priority indicator */
.vo-priority {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 3px;
  font: 500 10px/1 var(--font-sans); padding: 2px 8px; border-radius: var(--r-full);
  width: fit-content;
}
.vo-priority i { width: 10px; height: 10px; }
.vo-priority.follow-up { color: var(--warning-dark, #d97706); background: rgba(245,158,11,0.08); }
.vo-priority.awaiting { color: var(--info); background: rgba(59,130,246,0.06); }
.vo-priority.not-contacted { color: var(--gray-500); background: var(--gray-100); }

/* Actions cell in vendor row */
.vo-vendor-actions {
  display: flex; align-items: center; justify-content: center;
}
.vo-vendor-actions-btn {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.vo-vendor-actions-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.vo-vendor-actions-btn i { width: 16px; height: 16px; }

/* ── Expanded thread cards panel ── */
.vo-threads-panel {
  padding: var(--s-3) var(--s-4) var(--s-4) calc(36px + var(--s-4) + var(--s-3));
  background: var(--gray-50); border-top: 1px solid var(--gray-100);
  animation: tv2SlideUp 0.2s ease both;
}

/* Thread panel header */
.vo-tp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.vo-tp-label {
  font: 600 11px/1 var(--font-sans); color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.vo-tp-new-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: var(--white); font: 500 11px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all var(--t-fast);
}
.vo-tp-new-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-wash); }
.vo-tp-new-btn i { width: 12px; height: 12px; }

/* Individual thread card */
.vo-thread-card {
  display: grid; grid-template-columns: 3px 1fr auto;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-md);
  overflow: hidden; margin-bottom: var(--s-2); cursor: pointer;
  transition: all var(--t-fast); animation: tv2SlideUp 0.25s ease both;
}
.vo-thread-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.vo-thread-card:last-child { margin-bottom: 0; }

/* Thread card accent bar (left 3px) */
.vo-tc-accent { border-radius: var(--r-md) 0 0 var(--r-md); }
.vo-tc-accent.replied { background: var(--success); }
.vo-tc-accent.sent { background: var(--info); }
.vo-tc-accent.draft { background: var(--gray-300); }
.vo-tc-accent.closed { background: var(--gray-300); }
.vo-tc-accent.scheduled { background: #8B5CF6; }
.vo-tc-accent.bounced { background: var(--error); }
.vo-tc-accent.not_contacted { background: var(--gray-300); }

/* Thread card body (middle) */
.vo-tc-body { padding: var(--s-3) var(--s-4); min-width: 0; }
.vo-tc-subject {
  font: 600 13px/1.3 var(--font-sans); color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vo-tc-snippet {
  font: 400 12px/1.4 var(--font-sans); color: var(--gray-500); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vo-tc-snippet.empty { font-style: italic; color: var(--gray-400); }

/* Thread card meta (right side) */
.vo-tc-meta {
  padding: var(--s-3) var(--s-4); display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center; gap: 3px; min-width: 130px;
}
.vo-tc-status {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font: 600 11px/1 var(--font-sans); padding: 3px 8px; border-radius: var(--r-full);
}
.vo-tc-status .dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.vo-tc-status.replied { background: var(--success-wash); color: var(--success); }
.vo-tc-status.replied .dot { background: var(--success); }
.vo-tc-status.sent { background: var(--info-wash); color: var(--info); }
.vo-tc-status.sent .dot { background: var(--info); }
.vo-tc-status.draft { background: var(--gray-100); color: var(--gray-500); }
.vo-tc-status.draft .dot { background: var(--gray-400); }
.vo-tc-status.closed { background: var(--gray-100); color: var(--gray-400); }
.vo-tc-status.closed .dot { background: var(--gray-300); }
.vo-tc-status.scheduled { background: rgba(139,92,246,0.08); color: #8B5CF6; }
.vo-tc-status.scheduled .dot { background: #8B5CF6; }
.vo-tc-status.bounced { background: var(--error-wash); color: var(--error); }
.vo-tc-status.bounced .dot { background: var(--error); }
.vo-tc-status.not_contacted { background: var(--gray-100); color: var(--gray-500); }
.vo-tc-status.not_contacted .dot { background: var(--gray-400); }

.vo-tc-time { font: 400 11px/1 var(--font-mono); color: var(--gray-400); }
.vo-tc-msgs { font: 500 10px/1 var(--font-sans); color: var(--gray-400); }
.vo-tc-await {
  display: inline-flex; align-items: center; gap: 2px;
  font: 500 10px/1 var(--font-sans); padding: 1px 6px; border-radius: var(--r-full);
}
.vo-tc-await.vendor { color: var(--info); background: rgba(59,130,246,0.06); }
.vo-tc-await.us { color: var(--warning-dark, #d97706); background: rgba(245,158,11,0.06); }
.vo-tc-await i { width: 9px; height: 9px; }

/* Per-thread Reply button */
.vo-tc-reply-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font: 500 10px/1 var(--font-sans); padding: 2px 8px; border-radius: var(--r-full);
  background: rgba(59,130,246,0.08); color: var(--info); border: 1px solid rgba(59,130,246,0.15);
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.vo-tc-reply-btn:hover { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); }
.vo-tc-reply-btn i { width: 9px; height: 9px; }

/* Follow-up filter active bar */
.vo-filter-active-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: var(--r-sm); margin-bottom: 12px;
  background: rgba(59,130,246,0.05); border: 1px solid rgba(59,130,246,0.15);
  font: 400 13px/1.4 var(--font-sans); color: var(--gray-600);
}
.vo-filter-active-bar > i:first-child { width: 14px; height: 14px; color: var(--info); flex-shrink: 0; }
.vo-filter-clear {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto;
  font: 500 12px/1 var(--font-sans); padding: 4px 10px; border-radius: var(--r-full);
  background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.vo-filter-clear:hover { background: var(--gray-200); color: var(--gray-700); }
.vo-filter-clear i { width: 12px; height: 12px; }

/* Overflow link for 5+ threads */
.vo-tp-overflow {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-3); margin-top: var(--s-1);
  font: 500 12px/1 var(--font-sans); color: var(--brand); cursor: pointer;
  border-radius: var(--r-md); transition: all var(--t-fast);
}
.vo-tp-overflow:hover { background: var(--brand-wash); }
.vo-tp-overflow i { width: 14px; height: 14px; }

/* New table header for grouped view — simpler columns */
.vo-head-grouped {
  display: grid; grid-template-columns: 32px 36px 1fr 80px 1fr 40px;
  padding: 0 var(--s-4); background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

/* Empty state — matches SubTasks .st-empty */
.vo-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px var(--s-8); text-align: center;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-lg);
}
.vo-empty-icon {
  width: 64px; height: 64px; border-radius: var(--r-full);
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.vo-empty-icon i { width: 28px; height: 28px; color: var(--gray-400); }
.vo-empty h3 { font-size: 16px; font-weight: 700; color: var(--gray-800); margin: 0 0 var(--s-2) 0; }
.vo-empty p { font-size: 14px; color: var(--gray-500); max-width: 360px; line-height: 1.6; margin: 0; }
.vo-empty .v-btn { margin-top: var(--s-5); }

/* Selection bar */
.vo-selection-bar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; margin-top: 12px;
  background: var(--gray-900); color: white; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); animation: vSlideUp 0.25s ease both;
}
.vo-selection-info { display: flex; align-items: center; gap: 10px; }
.vo-selection-count { font-size: 13px; font-weight: 600; }
.vo-selection-clear {
  font-size: 12px; color: rgba(255,255,255,0.5); cursor: pointer;
  border: none; background: none; font-weight: 500; transition: color 0.15s;
  font-family: var(--font-sans);
}
.vo-selection-clear:hover { color: white; }
.vo-selection-actions { display: flex; gap: 8px; }
.vo-selection-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-md); border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s;
  font-family: var(--font-sans);
}
.vo-selection-btn.compose { background: var(--brand); color: white; }
.vo-selection-btn.compose:hover { background: var(--brand-light); }
.vo-selection-btn i { width: 15px; height: 15px; }

/* Compose panel */
.vo-compose {
  margin-top: 20px; padding: 28px; border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); background: white;
  animation: vSlideUp 0.3s ease both;
}
.vo-compose-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 24px;
}
.vo-compose-title i { width: 18px; height: 18px; color: var(--brand); }
.vo-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.vo-form-row.full { grid-template-columns: 1fr; }
.vo-form-group { display: flex; flex-direction: column; gap: 6px; }
.vo-form-group.full { grid-column: 1 / -1; }
.vo-form-label { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; }
.vo-form-input {
  padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-700); font-size: 13px; font-weight: 500;
  transition: all 0.15s; min-height: 42px; outline: none;
  font-family: var(--font-sans); box-sizing: border-box;
}
.vo-form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vo-form-textarea {
  padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-700); font-size: 13px; font-weight: 500;
  font-family: var(--font-sans); resize: vertical; min-height: 160px; line-height: 1.6;
  transition: all 0.15s; outline: none; box-sizing: border-box; width: 100%;
}
.vo-form-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vo-compose-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

/* Sending-to callout box */
.vo-sending-to {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--brand-wash); border: 1px solid var(--brand-subtle);
  font-size: 13px; color: var(--gray-600); margin-bottom: 14px;
}
.vo-sending-to i { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; margin-top: 1px; }
.vo-sending-to strong { color: var(--gray-800); font-weight: 600; }

/* Duplicate warning */
.vo-warning {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 16px; margin-bottom: 12px;
  background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--r-md); font-size: 13px; color: var(--gray-700);
}
.vo-warning i { width: 16px; height: 16px; color: var(--warning); flex-shrink: 0; margin-top: 1px; }

/* Sending progress toast (fixed bottom center) */
.vo-toast {
  position: fixed; bottom: 24px; left: 50%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-radius: var(--r-lg);
  background: var(--gray-900); color: white;
  box-shadow: var(--shadow-lg); z-index: 50;
  animation: vToastIn 0.3s ease both;
  min-width: 300px;
}
.vo-toast.success { background: #065F46; }
.vo-toast i { width: 18px; height: 18px; flex-shrink: 0; }
.vo-toast-text { font-size: 13px; font-weight: 600; flex: 1; }
.vo-toast-progress {
  height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15);
  overflow: hidden; flex: 1; max-width: 120px;
}
.vo-toast-progress-fill {
  height: 100%; border-radius: 2px; background: var(--brand-light);
  transition: width 0.4s ease;
}
.vo-toast-close {
  background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer;
  padding: 2px; display: flex; align-items: center; justify-content: center;
}
.vo-toast-close:hover { color: white; }
.vo-toast-close i { width: 14px; height: 14px; }

/* ---------------------------------------------------------------------------
   Vendor Picker Modal
   --------------------------------------------------------------------------- */

/* Vendor Picker Modal — v2 */
.vp-modal { width: 620px; max-height: 80vh; display: flex; flex-direction: column; }

/* Quick-filter pill strip */
.vp-quick-filters {
  display: flex; gap: 6px; padding: 12px 24px; overflow-x: auto;
  border-bottom: 1px solid var(--gray-100); scrollbar-width: none;
}
.vp-quick-filters::-webkit-scrollbar { display: none; }
.vp-quick-pill {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 5px 10px; border-radius: var(--r-full); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-600); font: 500 12px/1 var(--font-sans);
  cursor: pointer; transition: all 0.15s;
}
.vp-quick-pill:hover { border-color: var(--gray-300); background: var(--gray-50); }
.vp-quick-pill.active { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-dark, #3A6465); }
.vp-quick-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.vp-quick-count { font-weight: 600; color: var(--gray-400); font-size: 11px; }
.vp-quick-pill.active .vp-quick-count { color: var(--brand); }

/* Search + filter row */
.vp-filter-row { display: flex; gap: 8px; align-items: center; }
.vp-search {
  flex: 1; padding: 8px 10px 8px 32px; border-radius: var(--r-sm);
  border: 1px solid var(--gray-200); background: white; color: var(--gray-700);
  font-size: 13px; font-weight: 500; font-family: var(--font-sans); outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8' stroke='%2394A3B8' stroke-width='2'/%3E%3Cpath d='M21 21l-4.35-4.35' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
}
.vp-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.vp-role-select {
  padding: 8px 28px 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: white; color: var(--gray-600); font: 500 12px/1 var(--font-sans); outline: none;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}

/* Select all / deselect all bar */
.vp-select-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 24px; border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.vp-select-bar-count { font: 400 12px/1 var(--font-sans); color: var(--gray-500); }
.vp-select-bar-actions { display: flex; gap: 6px; }
.vp-select-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--gray-200);
  background: #fff; font: 500 12px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all 0.15s;
}
.vp-select-btn:hover { background: var(--gray-100); color: var(--gray-800); border-color: var(--gray-300); }
.vp-select-btn.clear { border-color: var(--red-200); color: var(--red-500); }
.vp-select-btn.clear:hover { background: var(--red-50); border-color: var(--red-300); }
.vp-select-btn i { width: 13px; height: 13px; }

/* Vendor list */
.vp-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.vp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background 0.1s;
}
.vp-row:last-child { border-bottom: none; }
.vp-row:hover { background: var(--gray-50); }
.vp-row.selected { background: var(--brand-wash); }
.vp-row.already { opacity: 0.45; cursor: default; }
.vp-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 600 11px/1 var(--font-sans); color: white;
}
.vp-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vp-row-name { font: 600 13px/1.3 var(--font-sans); color: var(--gray-800); display: flex; align-items: center; gap: 4px; }
.vp-ghl-icon { width: 12px; height: 12px; color: var(--brand); flex-shrink: 0; }
.vp-row-detail { font: 400 11px/1.3 var(--font-sans); color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.vp-row-roles { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.vp-row-tags { display: flex; gap: 4px; }
.vp-tag { font: 400 10px/1 var(--font-sans); color: var(--gray-500); padding: 2px 6px; border-radius: var(--r-sm); background: var(--gray-100); white-space: nowrap; }
.vp-already-tag {
  font: 600 10px/1 var(--font-sans); color: var(--gray-400);
  white-space: nowrap;
}

/* Footer */
.vp-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid var(--gray-200);
}
.vp-footer-info { font: 400 12px/1 var(--font-sans); color: var(--gray-500); }
.vp-footer-info strong { color: var(--gray-700); }

/* Picker empty state */
.vp-empty {
  display: flex; flex-direction: column; align-items: center; padding: 40px; text-align: center;
}
.vp-empty i { width: 36px; height: 36px; color: var(--gray-300); margin-bottom: 12px; stroke-width: 1.5; }
.vp-empty h4 { font-size: 14px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }

/* Bulk bar avatar stack */
.vo-avatar-stack { display: flex; margin-right: 4px; }
.vo-stack-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 600 9px/1 var(--font-sans); color: white;
  border: 2px solid var(--gray-900); margin-left: -6px;
}
.vo-stack-avatar:first-child { margin-left: 0; }
.vo-stack-avatar.blue   { background: var(--tag-blue); }
.vo-stack-avatar.green  { background: var(--tag-green); }
.vo-stack-avatar.indigo { background: var(--tag-indigo); }
.vo-stack-avatar.purple { background: var(--tag-purple); }
.vo-stack-avatar.orange { background: var(--tag-orange); }
.vo-stack-avatar.amber  { background: var(--tag-amber); }
.vo-stack-avatar.teal   { background: var(--brand); }
.vo-stack-avatar.rose   { background: var(--tag-rose); }
.vo-stack-avatar.gray   { background: var(--gray-400); }
.vo-selection-btn.outline {
  background: transparent; color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
}
.vo-selection-btn.outline:hover { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.4); }
.vp-empty p { font-size: 12px; color: var(--gray-400); }

/* ---------------------------------------------------------------------------
   Template Cards + Template Form
   --------------------------------------------------------------------------- */

.vt-cards { display: flex; flex-direction: column; gap: 12px; }
.vt-cards.vt-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .vt-cards.vt-grid-2 { grid-template-columns: 1fr; } }
.vt-card {
  border: 1px solid var(--gray-200); border-radius: var(--r-lg);
  background: white; overflow: hidden; transition: border-color 0.15s;
  animation: vSlideUp 0.3s ease both;
  display: flex; flex-direction: column;
}
.vt-card:hover { border-color: var(--gray-300); }
.vt-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 16px 0;
}
.vt-card-left { display: flex; flex-direction: column; gap: 4px; }
.vt-card-title { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.vt-card-meta { display: flex; align-items: center; gap: 12px; }
.vt-card-meta-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--gray-400); font-weight: 500; }
.vt-card-meta-item i { width: 12px; height: 12px; }
.vt-card-badges { display: flex; gap: 4px; padding: 8px 16px 0; }
.vt-card-actions { display: flex; gap: 4px; }
.vt-card-action {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.vt-card-action:hover { background: var(--gray-100); color: var(--gray-600); }
.vt-card-action i { width: 14px; height: 14px; }
.vt-card-body { padding: 12px 16px; flex: 1; }
.vt-card-subject {
  font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.vt-card-subject i { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; }
.vt-card-subject-label { font-size: 10px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; }
.vt-card-footer {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
}
.vt-card-preview {
  font-size: 12px; color: var(--gray-500); line-height: 1.6;
  max-height: 60px; overflow: hidden; position: relative;
}
.vt-card-preview::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 24px; background: linear-gradient(transparent, white);
}

/* Merge field highlighting */
.vt-merge-field {
  display: inline; padding: 1px 4px; border-radius: 3px;
  background: var(--brand-wash); color: var(--brand); font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
}

/* Merge field quick-insert buttons */
.vt-merge-buttons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.vt-merge-btn {
  padding: 3px 8px; border-radius: 4px; border: 1px solid var(--gray-200);
  background: var(--gray-50); color: var(--gray-500); font-size: 10px; font-weight: 600;
  font-family: var(--font-mono); cursor: pointer; transition: all 0.15s;
}
.vt-merge-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-wash); }

/* Template empty state */
.vt-empty {
  display: flex; flex-direction: column; align-items: center; padding: 60px 20px; text-align: center;
}
.vt-empty i { width: 48px; height: 48px; color: var(--gray-300); margin-bottom: 16px; stroke-width: 1.5; }
.vt-empty h3 { font-size: 16px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.vt-empty p { font-size: 13px; color: var(--gray-400); margin-bottom: 20px; max-width: 320px; line-height: 1.5; }

/* ---------------------------------------------------------------------------
   Communication Tab — Vendor Filter (V5)
   --------------------------------------------------------------------------- */

/* Per-type filter tab active colors */
.comm-v2 .filter-tab[data-type="vendor"].active { background: var(--brand-wash); color: var(--brand); border-color: var(--brand-subtle); }
.comm-v2 .filter-tab .filter-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.comm-v2 .filter-tab[data-type="group"] .filter-dot { background: #3B82F6; }
.comm-v2 .filter-tab[data-type="direct"] .filter-dot { background: #10B981; }
.comm-v2 .filter-tab[data-type="private"] .filter-dot { background: #F59E0B; }
.comm-v2 .filter-tab[data-type="system"] .filter-dot { background: #8B5CF6; }
.comm-v2 .filter-tab[data-type="vendor"] .filter-dot { background: var(--brand); }

/* Vendor Outreach badge in conversation header */
.vc-conv-badge {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
  background: var(--brand-wash); color: var(--brand); border: 1px solid var(--brand-subtle);
}

/* Inbound vendor message styling */
.comm-v2 .msg-body.vendor-inbound { background: #F4FAFA; border-color: rgba(72,122,123,0.15); }

/* ---------------------------------------------------------------------------
   Vendor Settings Tab (V7)
   --------------------------------------------------------------------------- */

.vs-section { margin-bottom: 32px; }
.vs-section-title { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.vs-section-desc { font-size: 12px; color: var(--gray-400); margin-bottom: 16px; }

/* Directory link card */
.vs-directory-link {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border: 1px solid var(--brand-subtle); border-radius: var(--r-md);
  background: var(--brand-wash); cursor: pointer; transition: all 0.15s;
}
.vs-directory-link:hover { border-color: var(--brand); }
.vs-directory-link-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--brand);
  display: flex; align-items: center; justify-content: center; color: white;
}
.vs-directory-link-icon i { width: 18px; height: 18px; }
.vs-directory-link-text { flex: 1; }
.vs-directory-link-title { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.vs-directory-link-desc { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.vs-directory-link-arrow { color: var(--brand); }
.vs-directory-link-arrow i { width: 16px; height: 16px; }

/* Vendor type rows */
.vs-types-list { display: flex; flex-direction: column; gap: 8px; }
.vs-type-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: white;
}
.vs-type-name { font-size: 13px; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.vs-type-count { font-size: 12px; color: var(--gray-400); font-family: var(--font-mono); }
.vs-type-badge {
  padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-500);
}
.vs-type-badge.default { background: var(--brand-wash); color: var(--brand); }
.vs-type-actions { display: flex; gap: 4px; }
.vs-type-action {
  width: 24px; height: 24px; border-radius: 4px; border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.vs-type-action:hover { background: var(--gray-100); color: var(--gray-600); }
.vs-type-action i { width: 13px; height: 13px; }

/* Add custom type row */
.vs-add-type { display: flex; gap: 8px; margin-top: 8px; }
.vs-add-input {
  flex: 1; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  font-size: 13px; color: var(--gray-700); font-family: var(--font-sans); outline: none;
}
.vs-add-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 2: Scheduled sends, analytics, bulk actions
   ═══════════════════════════════════════════════════════════════════════════ */

/* Outreach stats bar — interactive filter buttons */
.vo-stats {
  display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) 0;
}
.vo-stat {
  display: inline-flex; align-items: center; gap: var(--s-1-5, 6px);
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  cursor: pointer; padding: var(--s-1) var(--s-2); border-radius: var(--r-md);
  transition: background var(--t-fast), color var(--t-fast); border: none; background: none;
  font-family: var(--font-sans);
}
.vo-stat:hover { background: var(--gray-50); }
.vo-stat.active { color: var(--brand); background: var(--brand-wash); }
.vo-stat-dot { width: 6px; height: 6px; border-radius: var(--r-full); flex-shrink: 0; }
.vo-stat-dot.total { background: var(--gray-400); }
.vo-stat-dot.sent { background: var(--info, #3b82f6); }
.vo-stat-dot.replied { background: var(--success, #10b981); }
.vo-stat-dot.bounced { background: var(--error); }
.vo-stat-dot.scheduled { background: #8B5CF6; }
.vo-stat-dot.not_contacted { background: var(--gray-400); }
.vo-stat-count { font-family: var(--font-mono); }
.vo-stat-label { white-space: nowrap; }

/* Follow-up suggestions banner */
.vo-followup-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 12px;
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.18);
}
.vo-followup-banner i { width: 16px; height: 16px; color: #F59E0B; flex-shrink: 0; }
.vo-followup-banner .vo-followup-text { flex: 1; font-size: 13px; color: var(--gray-700); }
.vo-followup-banner .v-btn.small {
  padding: 4px 12px; font-size: 12px; height: 28px;
}

/* Scheduled time (under status badge) */
.vo-scheduled-time {
  font-size: 10px; color: #8B5CF6; margin-top: 2px;
  font-family: var(--font-mono);
}

/* Schedule picker row in compose */
.vo-schedule-picker {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 8px;
  background: rgba(139,92,246,0.05); border: 1px solid rgba(139,92,246,0.15);
}
.vo-schedule-picker i { width: 16px; height: 16px; color: #8B5CF6; flex-shrink: 0; }
.vo-schedule-picker input[type="datetime-local"] {
  border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  padding: 6px 10px; font-size: 13px; font-family: var(--font-sans);
  color: var(--gray-700); outline: none;
}
.vo-schedule-picker input[type="datetime-local"]:focus {
  border-color: #8B5CF6; box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}

/* Split button (Send Now / Schedule) */
.vo-split-btn {
  display: inline-flex; align-items: stretch; position: relative;
}
.vo-split-btn > .v-btn.primary:first-child {
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.vo-split-toggle {
  border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
  padding: 0 6px !important; min-width: 0 !important;
  border-left: 1px solid rgba(255,255,255,0.2) !important;
}
.vo-split-toggle i { width: 14px; height: 14px; }
.vo-split-menu {
  position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); min-width: 180px; padding: 4px;
}
.vo-split-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; border: none; background: none; cursor: pointer;
  font-size: 13px; color: var(--gray-700); border-radius: 4px; text-align: left;
}
.vo-split-menu-item:hover { background: var(--gray-50); }
.vo-split-menu-item.active { color: var(--brand); font-weight: 600; }
.vo-split-menu-item i { width: 14px; height: 14px; }

/* Template performance stats */
.vt-card-meta-item.perf {
  color: var(--brand); font-weight: 600;
}

/* Directory bulk selection bar */
.vd-selection-bar {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; margin-top: 12px;
  background: var(--gray-800); color: #fff; border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  animation: vo-sel-slide 0.2s ease;
}
.vd-selection-info { display: flex; align-items: center; gap: 10px; }
.vd-selection-count { font-size: 13px; font-weight: 600; }
.vd-selection-clear {
  background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer;
  font-size: 12px; text-decoration: underline;
}
.vd-selection-clear:hover { color: #fff; }
.vd-selection-actions { display: flex; align-items: center; gap: 8px; }
.vd-selection-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: #fff; cursor: pointer; font-size: 12px; font-weight: 500;
}
.vd-selection-btn:hover { background: rgba(255,255,255,0.1); }
.vd-selection-btn i { width: 13px; height: 13px; }

/* Bulk type change menu */
.vd-bulk-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); min-width: 120px; padding: 4px;
}
.vd-bulk-menu-item {
  display: block; width: 100%; padding: 7px 12px; border: none;
  background: none; cursor: pointer; font-size: 13px; color: var(--gray-700);
  border-radius: 4px; text-align: left;
}
.vd-bulk-menu-item:hover { background: var(--gray-50); }

/* Bulk tag input */
.vd-tag-input-wrap {
  display: flex; align-items: center; gap: 6px;
}
.vd-tag-input {
  padding: 5px 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: var(--r-sm);
  background: rgba(255,255,255,0.1); color: #fff; font-size: 12px;
  width: 120px; outline: none; font-family: var(--font-sans);
}
.vd-tag-input::placeholder { color: rgba(255,255,255,0.5); }
.vd-tag-input:focus { border-color: var(--brand); }

/* Selected row highlight */
.vd-selected-row { background: rgba(72,122,123,0.04); }

/* Active row (panel open) */
.vd-active-row { background: rgba(72,122,123,0.06); box-shadow: inset 3px 0 0 var(--brand); }

/* Directory table rows — cursor + hover */
.vd-table tbody tr { cursor: pointer; transition: background 0.1s, box-shadow 0.1s; }
.vd-table tbody tr:hover { background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-200); }

/* ─────────────────────────────────────────────────────────────────────────
   Vendor Detail Panel — section + field styles (reuses td-panel-* base)
   ───────────────────────────────────────────────────────────────────────── */

.vo-detail-section { margin-bottom: 20px; }
.vo-detail-section:last-child { margin-bottom: 0; }
.vo-detail-label {
  display: flex; align-items: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--gray-500); margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.vo-detail-field {
  display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 13px;
}
.vo-detail-field-label {
  width: 72px; flex-shrink: 0; font-weight: 500; color: var(--gray-500); font-size: 12px;
}
.vo-detail-field-value { color: var(--gray-800); }
.vo-detail-field-value a { color: var(--brand); text-decoration: none; }
.vo-detail-field-value a:hover { text-decoration: underline; }

/* Email preview */
.vo-email-preview {
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--r-md);
  padding: 16px; max-height: 240px; overflow-y: auto; font-size: 13px; line-height: 1.6;
}
.vo-email-preview-subject {
  font-weight: 600; color: var(--gray-800); margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

/* Outreach timeline (reuses td-activity pattern) */
.vo-timeline-item {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-2) 0; position: relative;
}
.vo-timeline-item:not(:last-child)::after {
  content: ''; position: absolute; left: 7px; top: 24px; bottom: -4px;
  width: 1px; background: var(--gray-200);
}
.vo-timeline-dot {
  width: 15px; height: 15px; border-radius: var(--r-full);
  border: 2px solid var(--gray-200); background: var(--white);
  flex-shrink: 0; margin-top: 2px;
}
.vo-timeline-dot.sent { border-color: var(--sub-assigned, #3b82f6); background: rgba(59,130,246,0.08); }
.vo-timeline-dot.replied { border-color: var(--sub-approved); background: var(--sub-approved-wash); }
.vo-timeline-dot.scheduled { border-color: #8B5CF6; background: rgba(139,92,246,0.08); }
.vo-timeline-dot.bounced { border-color: var(--error); background: var(--error-wash); }
.vo-timeline-dot.added { border-color: var(--gray-300); }
.vo-timeline-text { font-size: 12px; color: var(--gray-600); line-height: 1.4; flex: 1; min-width: 0; }
.vo-timeline-text strong { font-weight: 600; color: var(--gray-700); }
.vo-timeline-date { font-size: 11px; font-family: var(--font-mono); color: var(--gray-400); margin-top: 1px; }
.vo-timeline-expand {
  font-size: 11px; color: var(--brand); cursor: pointer; border: none; background: none;
  font-weight: 500; padding: 0; margin-top: 2px; font-family: var(--font-sans);
}
.vo-timeline-expand:hover { text-decoration: underline; }
.vo-timeline-email-preview {
  margin-top: 6px; padding: 10px 12px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  font-size: 12px; line-height: 1.5; max-height: 120px; overflow-y: auto;
}

/* Property list in directory panel */
.vo-property-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md);
  cursor: pointer; transition: background var(--t-fast);
}
.vo-property-item:hover { background: var(--gray-50); }
.vo-property-address { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.vo-property-city { font-size: 11px; color: var(--gray-400); }
.vo-property-status { margin-left: auto; flex-shrink: 0; }
.vo-property-date { font-size: 11px; font-family: var(--font-mono); color: var(--gray-400); margin-left: auto; flex-shrink: 0; }
.vo-property-empty {
  padding: var(--s-5); text-align: center; font-size: 13px; color: var(--gray-400);
  border: 1px dashed var(--gray-200); border-radius: var(--r-md); font-style: italic;
}

/* Tag chips in directory panel */
.vd-tag-chip {
  display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 500;
  background: var(--gray-100); color: var(--gray-600); border-radius: 12px;
}

/* (removed overflow override — primary rule handles it) */

/* ═══════════════════════════════════════════════════════════════════════════
   V3: Reply snippet in detail panel
   ═══════════════════════════════════════════════════════════════════════════ */

.vo-reply-snippet {
  padding: var(--s-3); background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--r-md); margin-top: var(--s-2);
}
.vo-reply-snippet-text {
  font-size: 13px; color: var(--gray-600); font-style: italic; line-height: 1.5;
}
.vo-reply-snippet-meta {
  font-size: 11px; color: var(--gray-400); margin-top: var(--s-1);
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.vo-reply-snippet-link {
  color: var(--brand); font-size: 11px; font-weight: 500;
  border: none; background: none; cursor: pointer; padding: 0;
  font-family: var(--font-sans);
}
.vo-reply-snippet-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   V4: Detail Panel — Avatar header, thread cards, timeline
   ═══════════════════════════════════════════════════════════════════════════ */

/* Panel header — sticky with vendor identity */
.dp-header {
  padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--gray-200);
  background: var(--white); position: sticky; top: 0; z-index: 2;
}
.dp-header-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-3); }
.dp-vendor { display: flex; align-items: center; gap: var(--s-3); }
.dp-avatar {
  width: 44px; height: 44px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 15px/1 var(--font-sans); color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.dp-vendor-info { min-width: 0; }
.dp-vendor-name { font: 700 16px/1.2 var(--font-sans); color: var(--gray-900); }
.dp-vendor-company { font: 400 13px/1.3 var(--font-sans); color: var(--gray-500); margin-top: 2px; }
.dp-vendor-email { font: 400 12px/1.3 var(--font-sans); color: var(--gray-400); margin-top: 1px; }
.dp-vendor-email a { color: var(--gray-400); text-decoration: none; transition: color var(--t-fast); }
.dp-vendor-email a:hover { color: var(--brand); }
.dp-close {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
  flex-shrink: 0;
}
.dp-close:hover { background: var(--gray-100); color: var(--gray-600); }
.dp-close i { width: 16px; height: 16px; }
.dp-badges { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.dp-aggregate {
  font: 500 12px/1 var(--font-sans); color: var(--gray-500);
  padding: 4px 10px; background: var(--gray-100); border-radius: var(--r-full);
}

/* Panel body */
.dp-body { padding: var(--s-5) var(--s-6); flex: 1; overflow-y: auto; }

/* Sections */
.dp-section { margin-bottom: var(--s-5); }
.dp-section:last-child { margin-bottom: 0; }
.dp-section-title {
  display: flex; align-items: center; gap: var(--s-2);
  font: 600 11px/1 var(--font-sans); color: var(--gray-500); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: var(--s-3);
}
.dp-section-title i { width: 14px; height: 14px; color: var(--gray-400); }

/* Thread cards inside detail panel */
.dp-thread {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-md);
  padding: var(--s-4); margin-bottom: var(--s-3); transition: all var(--t-fast);
  position: relative; overflow: hidden;
  animation: slideUp 0.2s ease both;
}
.dp-thread:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.dp-thread::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.dp-thread.replied::before { background: var(--success); }
.dp-thread.sent::before { background: var(--info, #3B82F6); }
.dp-thread.draft::before { background: var(--gray-300); }
.dp-thread.scheduled::before { background: var(--violet, #8B5CF6); }
.dp-thread.bounced::before { background: var(--error); }
.dp-thread.closed::before { background: var(--gray-300); }
.dp-thread.not_contacted::before { background: var(--gray-200); }

.dp-thread-top { margin-bottom: var(--s-2); }
.dp-thread-subject { font: 600 13px/1.4 var(--font-sans); color: var(--gray-800); min-width: 0; margin-bottom: 4px; }
.dp-thread-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.dp-thread-meta-item { display: flex; align-items: center; gap: 3px; font: 400 11px/1 var(--font-sans); color: var(--gray-500); }
.dp-thread-meta-item i { width: 12px; height: 12px; color: var(--gray-400); }
.dp-thread-snippet {
  font: 400 12px/1.5 var(--font-sans); color: var(--gray-500); font-style: italic;
  padding: var(--s-2) var(--s-3); background: var(--gray-50); border-radius: var(--r-sm);
  margin-bottom: var(--s-3); max-height: 48px; overflow: hidden;
}
.dp-thread-await {
  display: inline-flex; align-items: center; gap: 3px; margin-bottom: var(--s-2);
  font: 500 11px/1 var(--font-sans); padding: 2px 8px; border-radius: var(--r-full);
}
.dp-thread-await.vendor { color: var(--info, #3B82F6); background: rgba(59,130,246,0.06); }
.dp-thread-await.us { color: var(--accent, #F68D2E); background: rgba(246,141,46,0.06); }
.dp-thread-await i { width: 10px; height: 10px; }

.dp-thread-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.15s ease, opacity 0.15s ease, margin 0.15s ease; }
.dp-thread:hover .dp-thread-actions { max-height: 60px; opacity: 1; margin-top: var(--s-2); }
.dp-thread-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: var(--white); font: 500 11px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all var(--t-fast);
}
.dp-thread-btn:hover { border-color: var(--brand); color: var(--brand); background: rgba(72,122,123,0.04); }
.dp-thread-btn.primary { background: var(--brand); border-color: var(--brand); color: var(--white); }
.dp-thread-btn.primary:hover { background: var(--brand-dark, #3A6465); }
.dp-thread-btn.danger { color: var(--error); border-color: var(--error); }
.dp-thread-btn.danger:hover { background: var(--error-wash, rgba(239,68,68,0.06)); }
.dp-thread-btn i { width: 12px; height: 12px; }

/* New Email Thread dashed button */
.dp-new-thread-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: var(--s-3); border-radius: var(--r-md);
  border: 1px dashed var(--gray-300); background: var(--gray-50);
  font: 500 12px/1 var(--font-sans); color: var(--gray-500);
  cursor: pointer; transition: all var(--t-fast);
}
.dp-new-thread-btn:hover { border-color: var(--brand); color: var(--brand); background: rgba(72,122,123,0.04); }
.dp-new-thread-btn i { width: 14px; height: 14px; }

/* View in Conversations link (matches mockup State 2) */
.dp-view-in-conv {
  display: flex; align-items: center; gap: 6px;
  padding: var(--s-2) 0; margin-top: var(--s-1);
  font: 500 12px/1 var(--font-sans); color: var(--brand);
  cursor: pointer; border: none; background: none;
  transition: color var(--t-fast);
}
.dp-view-in-conv:hover { color: var(--brand-dark, #3A6465); }
.dp-view-in-conv i { width: 14px; height: 14px; }

/* Cross-thread timeline */
.dp-timeline { position: relative; padding-left: 20px; }
.dp-timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 1px; background: var(--gray-200); }
.dp-tl-item { position: relative; padding-bottom: var(--s-4); padding-left: var(--s-4); }
.dp-tl-item:last-child { padding-bottom: 0; }
.dp-tl-dot {
  position: absolute; left: -16px; top: 3px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--white);
}
.dp-tl-dot.outbound { background: var(--brand); }
.dp-tl-dot.inbound { background: var(--success); }
.dp-tl-dot.system { background: var(--gray-300); }
.dp-tl-text { font: 400 12px/1.5 var(--font-sans); color: var(--gray-600); }
.dp-tl-text strong { font-weight: 600; color: var(--gray-800); }
.dp-tl-text .tag {
  font: 500 10px/1 var(--font-mono, monospace); color: var(--gray-400);
  background: var(--gray-100); padding: 1px 5px; border-radius: 3px; margin-left: 4px;
}
.dp-tl-time { font: 400 10px/1 var(--font-mono, monospace); color: var(--gray-400); margin-top: 2px; }

/* Footer actions */
.dp-footer {
  padding: var(--s-3) var(--s-6); border-top: 1px solid var(--gray-200);
  background: var(--gray-50); display: flex; align-items: center; gap: var(--s-2);
}
.dp-footer-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--gray-200);
  background: var(--white); font: 500 12px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all var(--t-fast);
}
.dp-footer-btn:hover { border-color: var(--brand); color: var(--brand); }
.dp-footer-btn.danger { color: var(--error); border-color: transparent; }
.dp-footer-btn.danger:hover { background: var(--error-wash, rgba(239,68,68,0.06)); border-color: var(--error); }
.dp-footer-btn i { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════════════════════════════════
   V4: Conversations Sub-Tab — 3-Level Navigation
   ═══════════════════════════════════════════════════════════════════════════ */

/* Layout container — bordered rounded box, inset within tab content */
.conv-layout {
  display: grid; grid-template-columns: 280px 1fr;
  height: 600px;
  border: 1px solid var(--gray-200); border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}

/* Left rail */
.conv-rail { border-right: 1px solid var(--gray-200); display: flex; flex-direction: column; background: var(--gray-50); min-height: 0; flex-shrink: 0; }
.conv-rail-header { padding: var(--s-3); border-bottom: 1px solid var(--gray-200); background: var(--white); }
.conv-rail-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.conv-rail-title span { font: 600 13px/1 var(--font-sans); color: var(--gray-800); }
.conv-rail-title .count { font: 600 10px/1 var(--font-mono); background: var(--gray-100); color: var(--gray-500); padding: 2px 6px; border-radius: var(--r-full); }
.conv-rail-title:last-child { margin-bottom: 0; }
.conv-rail-count { font: 600 10px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); margin-top: var(--s-3); }
.conv-search {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--gray-200); border-radius: var(--r-md); background: var(--gray-50);
  transition: all var(--t-fast);
}
.conv-search:focus-within { border-color: var(--brand); background: var(--white); box-shadow: 0 0 0 3px rgba(72,122,123,0.20); }
.conv-search i, .conv-search svg { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; display: inline-block; }
.conv-search input {
  border: none; background: none; font: 400 12px/1 var(--font-sans); color: var(--gray-700);
  outline: none; width: 100%;
}
.conv-search input::placeholder { color: var(--gray-400); }

/* Vendor list items */
.conv-list { flex: 1; overflow-y: auto; }
.conv-vendor-item {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background var(--t-fast); position: relative;
}
.conv-vendor-item:hover { background: var(--gray-50); }
.conv-vendor-item.active { background: rgba(72,122,123,0.06); border-left: 3px solid var(--brand); padding-left: 13px; }
.conv-vendor-item:last-child { border-bottom: none; }

.conv-vendor-item.dimmed { opacity: 0.5; }
.conv-vendor-item.dimmed .cvi-name { color: var(--gray-500); }
.cvi-top { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 0; }
.cvi-avatar {
  width: 32px; height: 32px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 600 11px/1 var(--font-sans); color: var(--white);
}
.cvi-name-block { flex: 1; min-width: 0; }
.cvi-name { font: 600 13px/1.2 var(--font-sans); color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvi-company { font: 400 11px/1.2 var(--font-sans); color: var(--gray-500); margin-top: 1px; }
.cvi-time { font: 400 10px/1 var(--font-mono); color: var(--gray-400); flex-shrink: 0; }
.cvi-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.cvi-summary { font: 400 11px/1.3 var(--font-sans); color: var(--gray-400); margin-top: 1px; }

.cvi-bottom { padding-left: 40px; }
.cvi-threads { font: 500 11px/1.3 var(--font-sans); color: var(--gray-500); }
.cvi-threads strong { font-weight: 700; color: var(--gray-700); }
.cvi-tags { display: flex; align-items: center; gap: var(--s-1-5); margin-top: 3px; }

/* Right content area — single scroll container (header + messages + reply bar all scroll together, like Communication tab) */
.conv-content { display: flex; flex-direction: column; overflow-y: auto; background: var(--gray-50); min-height: 0; }

/* Empty state */
.conv-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--gray-400); text-align: center; gap: var(--s-3); padding: var(--s-8);
}
.conv-empty i { width: 48px; height: 48px; color: var(--gray-300); stroke-width: 1.2; }
.conv-empty-title { font: 600 15px/1 var(--font-sans); color: var(--gray-600); }
.conv-empty-desc { font: 400 13px/1.5 var(--font-sans); color: var(--gray-400); max-width: 300px; }

/* Level 2 — Thread list */
.conv-thread-list { flex: 1; overflow-y: auto; padding: var(--s-4); }

.ctl-header {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 0 var(--s-4); border-bottom: 1px solid var(--gray-200); margin-bottom: var(--s-4);
}
.ctl-avatar {
  width: 40px; height: 40px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 14px/1 var(--font-sans); color: var(--white);
}
.ctl-vendor-info { flex: 1; min-width: 0; }
.ctl-vendor-name { font: 700 15px/1.2 var(--font-sans); color: var(--gray-900); }
.ctl-vendor-detail { font: 400 12px/1.3 var(--font-sans); color: var(--gray-500); margin-top: 2px; }
.ctl-vendor-company { font: 400 12px/1.3 var(--font-sans); color: var(--gray-500); margin-top: 2px; }
.ctl-vendor-summary { font: 500 11px/1 var(--font-sans); color: var(--gray-400); margin-top: 4px; }

.ctl-new-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-md); border: 1px solid var(--gray-200);
  background: var(--white); font: 500 12px/1 var(--font-sans); color: var(--gray-700);
  cursor: pointer; transition: all var(--t-fast); box-shadow: var(--shadow-xs); flex-shrink: 0;
}
.ctl-new-btn:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-sm); }
.ctl-new-btn i, .ctl-new-btn svg { width: 14px; height: 14px; display: inline-block; }
.conv-thread-list i[data-lucide] { display: inline-block; width: 14px; height: 14px; }

/* Thread card in conversations */
.ctl-thread {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-md);
  padding: var(--s-4); margin-bottom: var(--s-3); cursor: pointer;
  transition: all var(--t-fast); position: relative; overflow: hidden;
  animation: slideUp 0.2s ease both;
}
.ctl-thread:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.ctl-thread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.ctl-thread.replied::before { background: var(--success); }
.ctl-thread.sent::before { background: var(--info, #3B82F6); }
.ctl-thread.draft::before { background: var(--gray-300); }
.ctl-thread.not_contacted::before { background: var(--gray-200); }
.ctl-thread.scheduled::before { background: var(--violet, #8B5CF6); }
.ctl-thread.bounced::before { background: var(--error); }
.ctl-thread.closed::before { background: var(--gray-300); }

.ctl-thread-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-2); }
.ctl-thread-subject { font: 600 14px/1.3 var(--font-sans); color: var(--gray-800); flex: 1; min-width: 0; }
.ctl-thread-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; margin-left: var(--s-4); }

/* Thread type badges (Direct / Group) */
.ctl-type-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font: 500 10px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.03em;
  padding: 2px 6px; border-radius: 4px; vertical-align: middle; margin-right: 6px; flex-shrink: 0;
}
.ctl-type-badge.direct { background: var(--gray-100); color: var(--gray-500); }
.ctl-type-badge.group { background: #EFF6FF; color: #3B82F6; }

/* Recipient suggestion dropdown */
.compose-suggestions {
  position: absolute; top: 100%; left: 60px; right: 0; z-index: 50;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 240px; overflow-y: auto; padding: 4px;
}
.compose-suggestion {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: background 0.1s;
}
.compose-suggestion:hover { background: var(--gray-50); }
.compose-suggestion-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.compose-suggestion-name { font: 500 12px/1.3 var(--font-sans); color: var(--gray-800); }
.compose-suggestion-email { font: 400 11px/1.3 var(--font-sans); color: var(--gray-400); }

.ctl-thread-bottom { display: flex; align-items: center; gap: var(--s-2); }
.ctl-thread-snippet {
  font: 400 12px/1.4 var(--font-sans); color: var(--gray-500); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Level 3 — Message thread (no overflow constraint — scrolls with parent .conv-content) */
.conv-messages { flex: 1; display: flex; flex-direction: column; }

.cm-header {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-200);
  background: var(--white); display: flex; align-items: center; gap: var(--s-3);
  min-height: 52px; flex-shrink: 0;
}
.cm-back {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
  flex-shrink: 0;
}
.cm-back:hover { background: var(--gray-100); color: var(--gray-600); }
.cm-back i, .cm-back svg { width: 16px; height: 16px; display: inline-block; }
/* Reserve space for Lucide icons before SVG replacement */
.conv-messages i[data-lucide] { display: inline-block; width: 16px; height: 16px; }
.cm-breadcrumb { font: 400 12px/1 var(--font-sans); color: var(--gray-400); }
.cm-breadcrumb strong { font-weight: 600; color: var(--gray-700); }
.cm-header-right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }

/* Message list */
/* ── L3 Message Thread View ─────────────────────────────────────────────── */
/* Messages flow naturally — no internal scroll, parent .conv-content scrolls everything */
.cm-messages { padding: var(--s-5) var(--s-6); }

/* Date separator */
.cm-date-sep {
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-6) 0 var(--s-5);
}
.cm-date-sep:first-child { margin-top: 0; }
.cm-date-sep::before, .cm-date-sep::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.cm-date-sep span, .cm-date-line, .cm-date-label {
  font: 600 10px/1 var(--font-sans); color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.cm-date-line { flex: 1; height: 1px; background: var(--gray-200); }
.cm-date-label {
  font: 600 10px/1 var(--font-sans); color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}

/* Message card */
.cm-message {
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-4);
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: box-shadow 0.2s;
  animation: slideUp 0.3s ease both;
}
.cm-message:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.cm-message.outbound { background: var(--white); }
.cm-message.inbound { background: #F4FAFA; border-color: #DBE9EA; }

/* Message header row */
.cm-msg-header {
  display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3);
}
.cm-msg-avatar {
  width: 34px; height: 34px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 600 11px/1 var(--font-sans); color: var(--white);
}
.cm-msg-sender { font: 600 13px/1 var(--font-sans); color: var(--gray-800); }
.cm-msg-direction {
  display: inline-flex; padding: 2px 6px; border-radius: var(--r-sm);
  font: 600 9px/1 var(--font-sans); text-transform: uppercase; letter-spacing: 0.04em;
}
.cm-msg-direction.sent { background: rgba(72,122,123,0.06); color: var(--brand); }
.cm-msg-direction.received { background: rgba(59,130,246,0.08); color: #3B82F6; }
.cm-msg-time { font: 400 11px/1 var(--font-mono); color: var(--gray-400); margin-left: auto; }
.cm-msg-delivery { display: flex; align-items: center; gap: 3px; font: 500 10px/1 var(--font-sans); color: var(--success); margin-left: var(--s-2); }
.cm-msg-delivery i { width: 12px; height: 12px; }

/* Recipients line */
.cm-msg-recipients {
  font: 400 12px/1 var(--font-sans); color: var(--gray-400);
  margin-left: 46px; margin-bottom: var(--s-3);
}

/* Message body */
.cm-msg-body {
  margin-left: 46px;
  font: 400 14px/1.75 var(--font-sans); color: var(--gray-700);
}
.cm-msg-body.inbound {
  padding-left: var(--s-4);
  border-left: 3px solid var(--success);
}
.cm-msg-body p { margin-bottom: var(--s-3); }
.cm-msg-body p:last-child { margin-bottom: 0; }

/* Quoted text toggle (email chain) */
.cm-quoted-section {
  margin-left: 46px; margin-top: var(--s-2);
}
.cm-quoted-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); padding: 0 8px; height: 20px;
  font-size: 11px; color: var(--gray-500); cursor: pointer;
  letter-spacing: 2px; line-height: 1; transition: all 0.15s;
}
.cm-quoted-toggle:hover { background: var(--gray-200); color: var(--gray-700); }
.cm-quoted-toggle.expanded { background: var(--gray-200); }
.cm-quoted-body {
  margin-top: var(--s-2); padding: var(--s-3) var(--s-4);
  border-left: 2px solid var(--gray-200); background: var(--gray-50);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font: 400 13px/1.6 var(--font-sans); color: var(--gray-500);
  overflow-x: auto; word-break: break-word;
}
.cm-quoted-body blockquote {
  margin: 0; padding-left: var(--s-3);
  border-left: 1px solid var(--gray-300); color: var(--gray-500);
}

/* Delivery status pill */
.cm-msg-footer {
  margin-top: var(--s-3); margin-left: 46px;
  display: flex; align-items: center; gap: var(--s-3);
}
.cm-delivery-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 10px/1 var(--font-sans); padding: 2px 8px;
  border-radius: var(--r-full);
}
.cm-delivery-pill.delivered { color: var(--success); background: rgba(16,185,129,0.08); }
.cm-delivery-pill.sent { color: var(--brand); background: rgba(72,122,123,0.06); }
.cm-delivery-pill.failed { color: #DC2626; background: rgba(220,38,38,0.08); }
.cm-d-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cm-delivery-pill.sending { color: var(--gray-500); background: rgba(107,114,128,0.08); }
.cm-message.msg-failed { border-left: 2px solid rgba(220,38,38,0.4); }
.cm-message .msg-bounce-reason {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 0 46px; padding: 6px 10px;
  background: rgba(220,38,38,0.04); border: 1px solid rgba(220,38,38,0.12);
  border-radius: var(--r-md); font: 400 11px/1.4 var(--font-sans); color: #DC2626;
}
.cm-message .msg-bounce-reason i { flex-shrink: 0; color: #DC2626; }

/* Per-message action buttons */
.cm-msg-actions {
  margin-top: var(--s-3); margin-left: 46px;
  display: flex; align-items: center; gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--gray-100);
}
.cm-action-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border: 1px solid var(--gray-200);
  border-radius: var(--r-md); background: var(--white);
  font: 500 12px/1 var(--font-sans); color: var(--gray-400);
  cursor: pointer; transition: all 0.15s;
}
.cm-action-btn:hover {
  border-color: var(--brand); color: var(--brand);
  background: rgba(72,122,123,0.04);
}
.cm-action-btn i { width: 13px; height: 13px; }

/* ── L3 Reply Bar (Compact / Expanded) ─────────────────────────────────── */
.cm-reply-bar {
  border-top: 1px solid var(--gray-200);
  padding: var(--s-3) var(--s-6);
  background: var(--white);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  flex-shrink: 0;
}

/* Compact mode — clickable placeholder */
.cm-reply-compact {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-4);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  cursor: pointer; transition: all 0.15s;
}
.cm-reply-compact:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(72,122,123,0.10);
}
.cm-reply-placeholder {
  flex: 1; font: 400 13px/1 var(--font-sans); color: var(--gray-400);
}

/* Expanded mode — full reply form */
.cm-reply-expanded {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: cmReplyOpen 0.2s ease-out;
}
@keyframes cmReplyOpen {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cm-re-field {
  padding: 6px var(--s-4);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: var(--s-2);
  font: 400 13px/1 var(--font-sans);
}
.cm-re-label {
  font: 500 12px/1 var(--font-sans); color: var(--gray-400); min-width: 24px;
}
.cm-re-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.cm-re-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px 3px 4px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  font: 500 12px/1 var(--font-sans); color: var(--gray-700);
}
.cm-re-chip-avatar {
  width: 18px; height: 18px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font: 700 7px/1 var(--font-sans); color: var(--white);
}
.cm-re-textarea-wrap { padding: var(--s-2) var(--s-4); }
.cm-re-textarea-wrap textarea {
  width: 100%; min-height: 44px; max-height: 200px;
  border: none; outline: none; resize: none;
  font: 400 13px/1.55 var(--font-sans); color: var(--gray-700);
  overflow-y: auto;
}
.cm-re-textarea-wrap textarea::placeholder { color: var(--gray-400); }
.cm-re-toolbar {
  padding: 4px var(--s-3);
  border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-50);
}
.cm-re-tools { display: flex; gap: 2px; }
.cm-re-tool {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border: none; background: transparent;
  border-radius: var(--r-sm);
  font: 500 12px/1 var(--font-sans); color: var(--gray-400);
  cursor: pointer; transition: all 0.15s;
}
.cm-re-tool:hover { background: rgba(0,0,0,0.03); color: var(--gray-600); }
.cm-re-tool i { width: 14px; height: 14px; }
.cm-re-actions { display: flex; align-items: center; gap: var(--s-2); }
.cm-re-cancel {
  padding: 6px 14px; border: none; background: transparent;
  font: 500 12px/1 var(--font-sans); color: var(--gray-400);
  cursor: pointer; border-radius: var(--r-md); transition: all 0.15s;
}
.cm-re-cancel:hover { background: var(--gray-100); color: var(--gray-600); }
.cm-re-send {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 20px; background: var(--brand); color: var(--white);
  border: none; border-radius: var(--r-md);
  font: 600 13px/1 var(--font-sans); cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(72,122,123,0.18);
}
.cm-re-send:hover {
  background: var(--brand-dark, #3A6465);
  box-shadow: 0 4px 14px rgba(72,122,123,0.25);
  transform: translateY(-1px);
}
.cm-re-send:active { transform: translateY(0); }
.cm-re-send i { width: 14px; height: 14px; }
.cm-re-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Shared avatar for reply compact mode */
.cm-reply-avatar {
  width: 28px; height: 28px; border-radius: var(--r-full); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 600 10px/1 var(--font-sans); color: var(--white); background: var(--brand);
}

/* Legacy reply bar elements (kept for backward compat) */
.cm-reply-recipient {
  font: 400 11px/1 var(--font-sans); color: var(--gray-400); margin-bottom: var(--s-1);
  display: flex; align-items: center; gap: 4px;
}
.cm-reply-recipient strong { color: var(--gray-600); font-weight: 600; }
.cm-reply-bar-inner { display: flex; gap: var(--s-2); align-items: flex-end; flex: 1; }
.cm-reply-input {
  flex: 1; padding: var(--s-2) var(--s-3); border: 1px solid var(--gray-200);
  border-radius: var(--r-md); background: var(--gray-50); font: 400 13px/1.4 var(--font-sans);
  color: var(--gray-700); outline: none; resize: none; min-height: 36px; max-height: 120px;
}
.cm-reply-input::placeholder { color: var(--gray-400); }
.cm-reply-input:focus { border-color: var(--brand); background: var(--white); box-shadow: 0 0 0 3px rgba(72,122,123,0.20); }
.cm-reply-tools { display: flex; align-items: center; gap: var(--s-1); }
.cm-reply-tools button {
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.cm-reply-tools button:hover { background: var(--gray-100); color: var(--gray-600); }
.cm-reply-tools button i { width: 14px; height: 14px; }
.cm-reply-tools .sep { width: 1px; height: 16px; background: var(--gray-200); }
.cm-reply-tools .tpl-btn {
  width: auto; padding: 0 8px;
  font: 500 11px/1 var(--font-sans); gap: 3px; display: inline-flex;
}
.cm-reply-send {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: var(--r-md); border: none;
  background: var(--brand); font: 600 12px/1 var(--font-sans); color: var(--white);
  cursor: pointer; transition: all 0.15s; box-shadow: 0 2px 8px rgba(72,122,123,0.18);
  flex-shrink: 0;
}
.cm-reply-send:hover { background: var(--brand-dark, #3A6465); }
.cm-reply-send:disabled { opacity: 0.5; cursor: not-allowed; }
.cm-reply-send i { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════
   V4: Compose View — New Thread Compose (State 9 mockup)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modal overlay */
.compose-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.compose-modal {
  background: var(--white); border-radius: var(--r-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 560px; max-width: 92vw; max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalSlideUp 0.2s ease;
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.compose-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
}
.compose-modal-close {
  width: 32px; height: 32px; border-radius: var(--r-md); border: none;
  background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); transition: all 0.15s;
}
.compose-modal-close:hover { background: var(--gray-100); color: var(--gray-600); }
.compose-modal-close i { width: 18px; height: 18px; }

.compose-modal-body {
  flex: 1; overflow-y: auto; padding: 0;
}

.compose-field {
  padding: 10px 20px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 8px;
}
.compose-field-label {
  font: 500 12px/1 var(--font-sans); color: var(--gray-400);
  min-width: 56px; text-transform: uppercase; letter-spacing: 0.5px;
}
.compose-field-chips {
  display: flex; flex-wrap: wrap; gap: 6px; flex: 1;
}
.compose-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 3px; border-radius: 20px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  font: 500 12px/1 var(--font-sans); color: var(--gray-700);
}
.compose-chip-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 700 9px/1 var(--font-sans); color: white;
}
.compose-chip-x {
  margin-left: 2px; color: var(--gray-400); cursor: pointer;
  font-size: 14px; font-weight: 500; line-height: 1; transition: color 0.15s;
}
.compose-chip-x:hover { color: var(--error, #DC2626); }
.compose-select {
  border: none; background: none; font: 400 13px/1 var(--font-sans);
  color: var(--gray-700); outline: none; flex: 1; cursor: pointer;
}
.compose-input {
  border: none; background: none; font: 400 13px/1 var(--font-sans);
  color: var(--gray-700); outline: none; flex: 1;
}
.compose-input::placeholder { color: var(--gray-400); }
.compose-textarea {
  padding: 16px 20px; min-height: 180px; font: 400 13px/1.7 var(--font-sans);
  color: var(--gray-700); border: none; border-top: none; outline: none;
  resize: none; width: 100%; display: block;
}
.compose-textarea::placeholder { color: var(--gray-400); }

.compose-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-50);
}
.compose-discard {
  padding: 8px 16px; border-radius: var(--r-md); border: 1px solid var(--gray-200);
  background: var(--white); font: 500 13px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all 0.15s;
}
.compose-discard:hover { background: var(--gray-50); border-color: var(--gray-300); }
.compose-send {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--r-md); border: none;
  background: var(--brand); font: 600 13px/1 var(--font-sans); color: var(--white);
  cursor: pointer; transition: all 0.15s; box-shadow: 0 2px 8px rgba(72,122,123,0.18);
}
.compose-send:hover { background: var(--brand-dark, #3A6465); }
.compose-send:disabled { opacity: 0.5; cursor: not-allowed; }
.compose-send i { width: 14px; height: 14px; }

/* Inline compose (Conversations sub-tab) */
.compose-view { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.compose-header {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-200);
  background: var(--white); display: flex; align-items: center; gap: var(--s-3);
}
.compose-body { flex: 1; padding: var(--s-4); overflow-y: auto; }
.compose-form {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-lg); overflow: hidden;
}
.compose-field-value { font: 500 13px/1 var(--font-sans); color: var(--gray-800); flex: 1; }
.compose-field .locked {
  display: inline-flex; align-items: center; gap: 3px;
  font: 500 10px/1 var(--font-sans); color: var(--gray-400); background: var(--gray-100);
  padding: 2px 6px; border-radius: 3px;
}
.compose-field .locked i { width: 10px; height: 10px; }
.compose-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--gray-200); background: var(--gray-50);
}
.compose-tools { display: flex; align-items: center; gap: var(--s-1); }
.compose-tools button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: var(--r-sm); border: none;
  background: transparent; font: 500 12px/1 var(--font-sans); color: var(--gray-500);
  cursor: pointer; transition: all 0.15s;
}
.compose-tools button:hover { background: var(--gray-100); color: var(--gray-700); }
.compose-tools button i { width: 14px; height: 14px; }
.compose-actions { display: flex; gap: var(--s-2); }
.compose-info {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  margin-top: var(--s-3); background: rgba(72,122,123,0.06); border: 1px solid rgba(72,122,123,0.10);
  border-radius: var(--r-md); font: 400 12px/1.5 var(--font-sans); color: var(--gray-600);
}
.compose-info i { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; margin-top: 1px; }
.compose-info strong { font-weight: 600; color: var(--gray-800); }

/* ═══ Vendor Compose — Attachment Infrastructure ═══ */

/* Drop overlay */
.vo-drop-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(72,122,123,0.06); border: 2px dashed var(--brand);
  border-radius: var(--r-md); pointer-events: none;
  font: 500 13px/1 var(--font-sans); color: var(--brand);
}
.vo-drop-overlay i { width: 24px; height: 24px; }

/* Attachment list */
.vo-attachment-list {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--s-2) var(--s-3); margin-top: var(--s-2);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
}
.vo-att-header {
  display: flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--font-sans); color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding-bottom: 4px; border-bottom: 1px solid var(--gray-200);
}
.vo-att-count {
  background: var(--brand); color: var(--white);
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: var(--r-full); min-width: 16px; text-align: center;
}
.vo-att-size { margin-left: auto; font-weight: 400; font-size: 10px; color: var(--gray-400); text-transform: none; letter-spacing: 0; }

/* Attachment chip */
.vo-att-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: var(--r-sm);
  background: var(--white); border: 1px solid var(--gray-200);
  font: 400 12px/1.3 var(--font-sans); color: var(--gray-700);
  transition: background var(--t-fast);
}
.vo-att-chip:hover { background: var(--gray-50); }
.vo-att-chip.uploading { opacity: 0.7; }
.vo-att-chip.error { border-color: var(--error); background: rgba(239,68,68,0.04); }
.vo-att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.vo-att-size-chip { font: 400 10px/1 var(--font-mono); color: var(--gray-400); flex-shrink: 0; }
.vo-att-spinner {
  width: 12px; height: 12px; border: 2px solid var(--gray-200);
  border-top-color: var(--brand); border-radius: 50%;
  animation: voSpin 0.6s linear infinite; flex-shrink: 0;
}
@keyframes voSpin { to { transform: rotate(360deg); } }
.vo-att-remove {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: none; background: none;
  color: var(--gray-400); cursor: pointer; border-radius: var(--r-sm);
  transition: all var(--t-fast); flex-shrink: 0; padding: 0;
}
.vo-att-remove:hover { background: var(--gray-100); color: var(--error); }

/* Compose footer toolbar */
.compose-footer-tools {
  display: flex; align-items: center; gap: var(--s-1);
}
.compose-footer-tool {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); background: var(--white);
  font: 500 12px/1 var(--font-sans); color: var(--gray-600);
  cursor: pointer; transition: all var(--t-fast);
}
.compose-footer-tool:hover { background: var(--gray-50); border-color: var(--gray-300); color: var(--gray-800); }
.compose-footer-tool i { width: 13px; height: 13px; }

/* Compose modal footer — split layout */
.compose-modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-5); border-top: 1px solid var(--gray-200);
  background: var(--gray-50); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.compose-footer-actions { display: flex; gap: var(--s-2); }
.compose-field:has(.compose-merge-hint) { flex-wrap: wrap; }
.compose-merge-hint {
  display: flex; align-items: center; gap: 4px; flex-basis: 100%;
  margin-top: 2px; font: 400 11px/1.3 var(--font-sans); color: var(--warning);
}

/* Reply bar attach button */
.cm-reply-tool {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); background: var(--white);
  color: var(--gray-400); cursor: pointer; transition: all var(--t-fast);
  flex-shrink: 0;
}
.cm-reply-tool:hover { background: var(--gray-50); color: var(--gray-600); border-color: var(--gray-300); }

/* Compose drop zone container */
.compose-drop-zone { position: relative; }

/* ── Thread Details Toggle Button ─────────────────────────────────────── */
.cm-details-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: var(--white); color: var(--gray-400);
  cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.cm-details-toggle:hover { border-color: var(--brand); color: var(--brand); background: rgba(72,122,123,0.04); }
.cm-details-toggle i { width: 15px; height: 15px; }

/* ── Thread Details Slide-out Panel ───────────────────────────────────── */
.conv-details-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.08);
  z-index: 999;
}
.conv-details-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 340px; max-width: 90vw;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
  animation: conv-details-slide 0.2s ease-out;
}
@keyframes conv-details-slide {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.conv-details-panel .details-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: var(--white); color: var(--gray-400);
  cursor: pointer; transition: all 0.15s;
}
.conv-details-panel .details-close:hover { border-color: var(--gray-400); color: var(--gray-600); }
.conv-details-panel .details-close i { width: 14px; height: 14px; }
.conv-details-panel .details-title {
  font: 700 15px/1.3 var(--font-sans);
  color: var(--gray-800);
  margin-bottom: 20px;
}
.conv-details-panel .details-section {
  margin-bottom: 20px;
}
.conv-details-panel .details-section-title {
  font: 600 10px/1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--gray-100);
}
.conv-details-panel .details-row {
  display: flex; justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-50);
}
.conv-details-panel .details-row:last-child { border-bottom: none; }
.conv-details-panel .details-label {
  font: 500 12px/1.3 var(--font-sans);
  color: var(--gray-500);
}
.conv-details-panel .details-value {
  font: 400 12px/1.3 var(--font-sans);
  color: var(--gray-700);
  text-align: right;
  max-width: 60%;
}
.conv-details-panel .details-participant {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
}
.conv-details-panel .details-participant-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font: 700 10px/1 var(--font-sans);
  flex-shrink: 0;
}
.conv-details-panel .details-participant-info {
  flex: 1; min-width: 0;
}
.conv-details-panel .details-participant-name {
  font: 500 12px/1.3 var(--font-sans);
  color: var(--gray-800);
}
.conv-details-panel .details-participant-email {
  font: 400 11px/1.3 var(--font-sans);
  color: var(--gray-400);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-details-panel .details-participant-role {
  font: 600 9px/1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}

/* ============================================================
   vo2 — Vendor Outreach v2 Polish Layer
   These classes layer ON TOP of existing markup. Removing them
   reverts to the original look. Never modify existing classes.
   ============================================================ */

/* --- Filter Bar (Conversations L2) --- */
.vo2-filter-bar {
  padding: var(--s-3) var(--s-4) var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.vo2-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.vo2-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font: 500 11px var(--font-sans);
  color: var(--gray-500);
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  white-space: nowrap;
}

.vo2-filter-pill:hover:not(.active) {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-300);
}

.vo2-filter-pill.active {
  background: var(--gray-900);
  color: var(--white);
  border-color: var(--gray-900);
}

.vo2-filter-pill .vo2-count {
  font-weight: 600;
}

.vo2-filter-pill .vo2-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Type dots */
.vo2-dot.direct { background: var(--gray-400); }
.vo2-filter-pill.active .vo2-dot.direct { background: var(--gray-300); }
.vo2-dot.group { background: #3B82F6; }
.vo2-filter-pill.active .vo2-dot.group { background: #93C5FD; }

/* Status dots */
.vo2-dot.st-active { background: #10B981; }
.vo2-filter-pill.active .vo2-dot.st-active { background: #6EE7B7; }
.vo2-dot.st-awaiting { background: #F59E0B; }
.vo2-filter-pill.active .vo2-dot.st-awaiting { background: #FCD34D; }
.vo2-dot.st-replied { background: var(--brand); }
.vo2-filter-pill.active .vo2-dot.st-replied { background: var(--brand-light); }
.vo2-dot.st-closed { background: var(--gray-300); }
.vo2-filter-pill.active .vo2-dot.st-closed { background: var(--gray-400); }

/* Zero-count pills muted */
.vo2-filter-pill.vo2-zero:not(.active) {
  color: var(--gray-400);
  border-color: var(--gray-100);
}
.vo2-filter-pill.vo2-zero:not(.active) .vo2-dot { opacity: 0.4; }

/* ═══════════════════════════════════════════════
   vo2 — Conversations UI Polish (additive)
   ═══════════════════════════════════════════════ */

/* Custom thin scrollbars */
.vo2-scrollable::-webkit-scrollbar { width: 4px; }
.vo2-scrollable::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 2px; }
.vo2-scrollable::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.vo2-scrollable::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Vendor card polish */
.vo2-vendor-card {
  transition: all 120ms ease;
}
.vo2-vendor-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: var(--gray-300);
}
.vo2-vendor-card.active:hover {
  box-shadow: none;
}

/* Thread card v2 — flat list style (override .ctl-thread rounded cards) */
.ctl-thread.vo2-thread-card {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--gray-100);
  border-left: 3px solid transparent;
  margin-bottom: 0;
  padding: 12px 20px;
  box-shadow: none;
  transition: all 120ms ease;
}
.ctl-thread.vo2-thread-card:hover {
  background: var(--gray-50);
  box-shadow: inset 0 0 0 1px var(--gray-200);
  border-color: transparent;
  border-left-color: inherit;
}
.ctl-thread.vo2-thread-card.selected {
  background: rgba(72,122,123,0.05);
  border-left-color: var(--brand);
}
/* Status-based left accent border */
.ctl-thread.vo2-thread-card.sent { border-left-color: var(--info, #3B82F6); }
.ctl-thread.vo2-thread-card.replied { border-left-color: var(--success); }
.ctl-thread.vo2-thread-card.draft,
.ctl-thread.vo2-thread-card.not_contacted { border-left-color: var(--gray-300); }
.ctl-thread.vo2-thread-card.scheduled { border-left-color: #8B5CF6; }
.ctl-thread.vo2-thread-card.bounced { border-left-color: var(--error); }
.ctl-thread.vo2-thread-card.closed { border-left-color: var(--gray-300); }
/* Remove the ::before pseudo since we use real border-left now */
.ctl-thread.vo2-thread-card::before { display: none; }
/* Tighter subject font */
.vo2-thread-card .ctl-thread-subject { font-size: 13px; }
/* Snippet styling refinement */
.vo2-thread-card .ctl-thread-snippet { font-size: 12px; color: var(--gray-500); }

/* Thread status pill (compact inline) */
.vo2-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font: 500 10px var(--font-sans);
  letter-spacing: 0.01em;
}
.vo2-status-pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.vo2-status-pill.replied { background: rgba(34,197,94,0.08); color: #16A34A; }
.vo2-status-pill.replied .dot { background: #22C55E; }
.vo2-status-pill.awaiting { background: rgba(59,130,246,0.08); color: #2563EB; }
.vo2-status-pill.awaiting .dot { background: #3B82F6; }
.vo2-status-pill.sent { background: rgba(59,130,246,0.08); color: #2563EB; }
.vo2-status-pill.sent .dot { background: #3B82F6; }
.vo2-status-pill.draft { background: var(--gray-100); color: var(--gray-500); }
.vo2-status-pill.draft .dot { background: var(--gray-400); }
.vo2-status-pill.closed { background: var(--gray-100); color: var(--gray-400); }
.vo2-status-pill.closed .dot { background: var(--gray-300); }

/* Thread type badge */
.vo2-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font: 500 10px var(--font-sans);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.vo2-type-badge.direct { background: rgba(59,130,246,0.08); color: #3B82F6; }
.vo2-type-badge.group { background: rgba(168,85,247,0.08); color: #A855F7; }
.vo2-type-badge i { width: 10px; height: 10px; }

/* Date separator (matches Communication tab) */
.vo2-date-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.vo2-date-sep::before,
.vo2-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}
.vo2-date-sep span {
  font: 600 11px var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   Conversations v2 — Exact mockup CSS port
   Source: mockups/vendors/vendor-property-experience-v2.html lines 1081-1162
   ═══════════════════════════════════════════════ */

/* L2 header — generous horizontal padding, justify between name and button */
.ctl-header {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ctl-header-left { display: flex; align-items: center; gap: var(--s-3); }

/* New Email button — brand-tinted, not white outline */
.ctl-new-btn {
  font: 600 12px/1 var(--font-sans); color: var(--brand);
  background: var(--brand-wash, rgba(72,122,123,0.06));
  border: 1px solid var(--brand-subtle, rgba(72,122,123,0.15));
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  transition: all 0.15s; flex-shrink: 0; box-shadow: none;
}
.ctl-new-btn:hover { background: var(--brand-subtle, rgba(72,122,123,0.15)); border-color: var(--brand); color: var(--brand); box-shadow: none; }

/* Filter pills — horizontal row with generous gap between groups */
.conv-filters {
  padding: var(--s-3) var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  border-bottom: 1px solid var(--gray-100);
}
.conv-filter-group {
  display: flex;
  gap: var(--s-1-5);
  align-items: center;
}
.conv-filter-pill {
  font: 500 11px/1 var(--font-sans);
  color: var(--gray-500);
  padding: 4px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all 0.15s;
  user-select: none;
  white-space: nowrap;
}
.conv-filter-pill:hover:not(.active) {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-300);
}
.conv-filter-pill.active {
  background: var(--gray-900);
  color: var(--white);
  border-color: var(--gray-900);
  font-weight: 600;
}
.conv-filter-pill .cf-count { font-weight: 600; }
.conv-filter-pill.active .cf-count { opacity: 0.7; }
.conv-filter-pill.cf-zero:not(.active) { color: var(--gray-300); border-color: var(--gray-100); }
.cf-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.cf-dot.direct { background: var(--info, #3B82F6); }
.cf-dot.group { background: #A855F7; }
.conv-filter-pill.active .cf-dot.direct { background: var(--gray-300); }
.conv-filter-pill.active .cf-dot.group { background: #93C5FD; }

/* Thread list — outer wrapper, no padding (padding lives on .conv-threads inside) */
.conv-thread-list { flex: 1; overflow-y: auto; padding: 0; }

/* Thread cards container — padded wrapper matching mockup */
.conv-threads { flex: 1; overflow-y: auto; padding: var(--s-3) var(--s-5); }

/* Thread card — individual rounded bordered cards (NOT flat list items) */
.conv-thread-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-2);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}
.conv-thread-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-xs); }
.conv-thread-card.selected { background: rgba(72,122,123,0.04); border-color: var(--brand-subtle, rgba(72,122,123,0.25)); }
/* Left accent stripe via ::before pseudo */
.conv-thread-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.conv-thread-card.tc-replied::before { background: var(--success); }
.conv-thread-card.tc-sent::before { background: var(--info, #3B82F6); }
.conv-thread-card.tc-draft::before,
.conv-thread-card.tc-not_contacted::before { background: var(--gray-300); }
.conv-thread-card.tc-scheduled::before { background: #8B5CF6; }
.conv-thread-card.tc-bounced::before { background: var(--error); }
.conv-thread-card.tc-closed::before { background: var(--gray-300); }

/* Card internals */
.ctc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-1-5); }
.ctc-left { display: flex; align-items: center; gap: var(--s-2); }
.ctc-subject { font: 600 13px/1.3 var(--font-sans); color: var(--gray-800); }
.ctc-right { display: flex; align-items: center; gap: var(--s-3); flex-shrink: 0; }
.ctc-meta { font: 400 11px/1 var(--font-sans); color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
.ctc-meta i, .ctc-meta svg { width: 12px; height: 12px; display: inline-block; }

/* Type badge — pill shape, blue for Direct, purple for Group */
.ctc-type-badge {
  font: 600 10px/1 var(--font-sans);
  padding: 2px 8px;
  border-radius: var(--r-full);
  display: flex; align-items: center; gap: 3px;
  flex-shrink: 0;
}
.ctc-type-badge i, .ctc-type-badge svg { width: 11px; height: 11px; display: inline-block; }
.ctc-type-badge.direct { background: rgba(59,130,246,0.08); color: var(--info, #3B82F6); }
.ctc-type-badge.group { background: rgba(168,85,247,0.08); color: #A855F7; }

/* Status pill — colored dot + text (scoped to conv thread cards to avoid outreach tab override) */
.conv-thread-card .status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px;
  font: 600 11px/1 var(--font-sans);
  white-space: nowrap; position: relative;
}
.conv-thread-card .status-pill::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
}
.conv-thread-card .status-pill.replied { background: rgba(16,185,129,0.08); color: #059669; }
.conv-thread-card .status-pill.replied::before { background: var(--success); }
.conv-thread-card .status-pill.sent { background: rgba(59,130,246,0.08); color: #2563EB; }
.conv-thread-card .status-pill.sent::before { background: var(--info, #3B82F6); }
.conv-thread-card .status-pill.not_contacted { background: var(--gray-100); color: var(--gray-500); }
.conv-thread-card .status-pill.not_contacted::before { background: var(--gray-300); }
.conv-thread-card .status-pill.draft { background: var(--gray-100); color: var(--gray-500); }
.conv-thread-card .status-pill.draft::before { background: var(--gray-400); }
.conv-thread-card .status-pill.bounced { background: rgba(239,68,68,0.08); color: #DC2626; }
.conv-thread-card .status-pill.bounced::before { background: var(--error); }
.conv-thread-card .status-pill.scheduled { background: rgba(139,92,246,0.08); color: #7C3AED; }
.conv-thread-card .status-pill.scheduled::before { background: #8B5CF6; }
.conv-thread-card .status-pill.closed { background: var(--gray-100); color: var(--gray-400); }
.conv-thread-card .status-pill.closed::before { background: var(--gray-300); }

/* Await badge */
.ctc-bottom { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.await-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 11px/1 var(--font-sans); color: #D97706;
}
.await-badge i, .await-badge svg { width: 12px; height: 12px; display: inline-block; }

/* Thread snippet */
.ctc-snippet {
  font: 400 12px/1.5 var(--font-sans); color: var(--gray-500);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* Message outbound indicator — stronger brand accent */
.cm-message.vo2-msg-outbound {
  border-left: 3px solid var(--brand);
  padding-left: 16px;
}

/* Message direction badge — styled inline pill */
.vo2-msg-direction {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 3px;
  font: 600 9px var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vo2-msg-direction.outbound { background: rgba(72,122,123,0.08); color: var(--brand); }
.vo2-msg-direction.inbound { background: var(--gray-100); color: var(--gray-500); }

/* Message card spacing improvements */
.cm-message.comm-v2.vo2-fade-msg {
  margin-bottom: 4px;
}
.cm-message.comm-v2.vo2-fade-msg .cm-msg-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-700);
}

/* Stagger animations */
@keyframes vo2SlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes vo2FadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.vo2-stagger {
  opacity: 0;
  animation: vo2SlideIn 280ms ease forwards;
}
.vo2-fade {
  opacity: 0;
  animation: vo2FadeUp 250ms ease forwards;
}
.vo2-stagger-1 { animation-delay: 0ms; }
.vo2-stagger-2 { animation-delay: 40ms; }
.vo2-stagger-3 { animation-delay: 80ms; }
.vo2-stagger-4 { animation-delay: 120ms; }
.vo2-stagger-5 { animation-delay: 160ms; }
.vo2-stagger-6 { animation-delay: 200ms; }
.vo2-stagger-7 { animation-delay: 240ms; }
.vo2-stagger-8 { animation-delay: 280ms; }

/* ═══════════════════════════════════════════════
   vo2 — Outreach Tab Polish (additive)
   ═══════════════════════════════════════════════ */

/* Vendor row — status accent border + hover */
.vo-vendor-row.vo2-outreach-row {
  transition: all 120ms ease;
  border-left: 3px solid transparent;
}
.vo-vendor-row.vo2-outreach-row:hover {
  background: var(--gray-50);
  box-shadow: inset 0 0 0 1px var(--gray-200), 0 2px 8px rgba(0,0,0,0.05);
}
.vo2-outreach-row.status-replied { border-left-color: var(--success); }
.vo2-outreach-row.status-awaiting { border-left-color: var(--info, #3B82F6); }
.vo2-outreach-row.status-sent { border-left-color: var(--info, #3B82F6); }
.vo2-outreach-row.status-not-contacted { border-left-color: var(--gray-300); }
.vo2-outreach-row.status-bounced { border-left-color: var(--error); }
.vo2-outreach-row.status-scheduled { border-left-color: #8B5CF6; }
.vo2-outreach-row.status-mixed { border-left-color: var(--brand); }

/* Thread card in expanded panel — hover lift */
.vo2-outreach-thread {
  transition: all 120ms ease;
}
.vo2-outreach-thread:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Stats bar dot animation */
.vo2-stat-pulse .vo-stat-dot {
  animation: vo2Pulse 2s ease-in-out infinite;
}
@keyframes vo2Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════
   vo2 — Templates + Cross-Surface Polish
   ═══════════════════════════════════════════════ */

/* Button hover lift */
.vo2-btn-lift {
  transition: all 120ms ease;
}
.vo2-btn-lift:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Focus-visible states on compose inputs */
.vo2-focus-ring:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: transparent;
}

/* Template card polish */
.vo2-template-card {
  transition: all 120ms ease;
}
.vo2-template-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: var(--gray-300);
}
/* System template cards (GHL) — subtler styling */
.vo2-sys-card {
  border-left: 3px solid #00897b;
  background: linear-gradient(135deg, #fafffe 0%, #fff 100%);
}
.vo2-sys-card:hover { border-left-color: #00695c; }
/* Import button in system card footer */
.vo2-import-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 11px/1 var(--font-sans); color: #00897b;
  padding: 4px 10px; border-radius: 5px;
  border: 1px solid #b2dfdb; background: #fff;
  cursor: pointer; transition: all 120ms ease;
}
.vo2-import-btn:hover { background: #e0f2f1; border-color: #80cbc4; }
.vo2-import-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Compose field labels — sentence case instead of ALL CAPS */
.vo2-label-sentence {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500;
}

/* Reply bar action links (extracted from inline styles) */
.vo2-reply-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vo2-reply-action {
  font: 400 11px var(--font-sans);
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  transition: all 100ms ease;
}
.vo2-reply-action:hover {
  color: var(--gray-600);
  border-color: var(--gray-300);
  background: var(--gray-50);
}
.vo2-reply-sep {
  font: 400 11px var(--font-sans);
  color: var(--gray-400);
}

/* Message card fade-up animation */
.vo2-fade-msg {
  opacity: 0;
  animation: vo2FadeUp 250ms ease forwards;
}

/* Primary button hover lift (global for vendor tabs) */
.vo-table .v-btn.primary,
.vt-cards .v-btn.primary,
.vo-compose .v-btn.primary {
  transition: all 120ms ease;
}
.vo-table .v-btn.primary:hover,
.vt-cards .v-btn.primary:hover,
.vo-compose .v-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}


/* ========================================================================
   PHASE 7.1 — VENDOR V2 DESIGN TOKENS
   Foundation CSS for the v2 vendor directory + per-property vendor experience.
   Defines reusable component classes consumed by Phases 7.2-7.7.
   ======================================================================== */


/* ============ ROLE BADGES ============
   Usage: <span class="role-badge lender">Lender</span>
   Roles: lender(blue), pm(green), investor(indigo), tc(purple),
          contractor(orange), agent(amber), connector(teal),
          operator(rose), capital(amber/accent), buyer(indigo),
          ai_tech(rose), service_provider(gray)
*/

.role-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; font-size: 10px; font-weight: 700;
  border-radius: var(--r-full); text-transform: uppercase;
  letter-spacing: 0.03em; white-space: nowrap;
}
.role-badge.lender     { color: var(--tag-blue);   background: var(--tag-blue-wash); }
.role-badge.investor,
.role-badge.buyer      { color: var(--tag-indigo); background: var(--tag-indigo-wash); }
.role-badge.pm         { color: var(--tag-green);  background: var(--tag-green-wash); }
.role-badge.tc         { color: var(--tag-purple); background: var(--tag-purple-wash); }
.role-badge.contractor { color: var(--tag-orange); background: var(--tag-orange-wash); }
.role-badge.agent      { color: var(--tag-amber);  background: var(--tag-amber-wash); }
.role-badge.connector  { color: var(--tag-teal);   background: var(--tag-teal-wash); }
.role-badge.operator,
.role-badge.ai_tech    { color: var(--tag-rose);   background: var(--tag-rose-wash); }
.role-badge.capital,
.role-badge.capital_raiser { color: var(--accent); background: var(--accent-wash); }
.role-badge.service_provider { color: var(--tag-gray); background: var(--tag-gray-wash); }
.role-badge.attorney  { color: var(--tag-purple); background: var(--tag-purple-wash); }
.role-badge.appraiser { color: var(--tag-teal);   background: var(--tag-teal-wash); }
.role-badge.inspector { color: var(--tag-green);  background: var(--tag-green-wash); }
.role-badge.insurance { color: var(--tag-rose);   background: var(--tag-rose-wash); }


/* ============ TAG PILLS ============
   Usage: <span class="tag-pill c-blue">Tag</span>
   Colors: c-blue, c-green, c-orange, c-purple, c-teal, c-rose,
           c-amber, c-indigo, c-brand, c-gray
*/

.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 11px; font-weight: 500;
  border-radius: var(--r-full); white-space: nowrap;
}
.tag-pill.c-blue   { color: var(--tag-blue);   background: var(--tag-blue-wash); }
.tag-pill.c-green  { color: var(--tag-green);  background: var(--tag-green-wash); }
.tag-pill.c-orange { color: var(--tag-orange); background: var(--tag-orange-wash); }
.tag-pill.c-purple { color: var(--tag-purple); background: var(--tag-purple-wash); }
.tag-pill.c-teal   { color: var(--tag-teal);   background: var(--tag-teal-wash); }
.tag-pill.c-rose   { color: var(--tag-rose);   background: var(--tag-rose-wash); }
.tag-pill.c-amber  { color: var(--tag-amber);  background: var(--tag-amber-wash); }
.tag-pill.c-indigo { color: var(--tag-indigo); background: var(--tag-indigo-wash); }
.tag-pill.c-brand  { color: var(--brand);      background: var(--brand-wash); }
.tag-pill.c-gray   { color: var(--tag-gray);   background: var(--tag-gray-wash); }

/* Removable tag-x icon inside .tag-pill */
.tag-pill .tag-x {
  width: 12px; height: 12px; cursor: pointer;
  opacity: 0.5; transition: opacity var(--t-fast);
}
.tag-pill .tag-x:hover { opacity: 1; }

/* Large tag pills (detail panel, editable tags) */
.tag-pill-lg {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 4px 10px; font-size: 12px; font-weight: 500;
  border-radius: var(--r-full);
}
.tag-pill-lg .tag-remove {
  width: 14px; height: 14px; border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0.5; transition: opacity var(--t-fast);
}
.tag-pill-lg .tag-remove:hover { opacity: 1; }
.tag-pill-lg .tag-remove i { width: 12px; height: 12px; }


/* ============ GHL SYNC INDICATORS ============ */

.ghl-sync-icon {
  width: 14px; height: 14px; color: var(--brand); flex-shrink: 0; opacity: 0.7;
}

.ghl-badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--r-full); color: var(--brand);
  background: var(--brand-wash); border: 1px solid var(--brand-subtle);
}
.ghl-badge i { width: 12px; height: 12px; }


/* ============ PRIORITY BADGE ============ */

.priority-badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--r-full);
}
.priority-badge.high {
  color: var(--accent); background: var(--accent-wash);
  border: 1px solid rgba(246,141,46,0.2);
}
.priority-badge i { width: 12px; height: 12px; }


/* ============ STATUS DOTS ============ */

.status-dot {
  width: 8px; height: 8px; border-radius: var(--r-full); display: inline-block;
}
.status-dot.active   { background: var(--success); }
.status-dot.inactive { background: var(--gray-300); }


/* ============ BIO CARD ============ */

.bio-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--r-md); padding: var(--s-4);
}
.bio-source {
  display: flex; align-items: center; gap: var(--s-1-5);
  font-size: 10px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: var(--s-2); padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--gray-100);
}
.bio-source i { width: 12px; height: 12px; }
.bio-text { font-size: 13px; color: var(--gray-600); line-height: 1.65; }


/* ============ LENDING PROFILE CARD ============ */

.lending-card {
  background: rgba(59,130,246,0.03); border: 1px solid rgba(59,130,246,0.12);
  border-radius: var(--r-lg); padding: var(--s-4);
}
.lending-header {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 11px; font-weight: 700; color: var(--tag-blue);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: var(--s-3); padding-bottom: var(--s-2);
  border-bottom: 1px solid rgba(59,130,246,0.10);
}
.lending-header i { width: 14px; height: 14px; }
.lending-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
}
.lending-label {
  font-size: 10px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px;
}
.lending-value { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.lending-value.bold { font-weight: 700; }
.lending-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s-1); }
.lending-pill {
  font-size: 10px; font-weight: 500; color: var(--tag-blue);
  background: var(--tag-blue-wash); padding: 2px 8px;
  border-radius: var(--r-full);
}


/* ============ SOCIAL LINKS ============ */

.social-links { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* Icon-only social buttons (detail panel) */
.social-btn {
  width: 36px; height: 36px; border-radius: var(--r-lg);
  border: 1px solid var(--gray-200); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t-fast);
}
.social-btn:hover { border-color: var(--brand); background: var(--brand-wash); }
.social-btn i { width: 16px; height: 16px; color: var(--gray-500); }
.social-btn:hover i { color: var(--brand); }

/* Text-label social links (directory detail panel) */
.social-link {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 4px 10px; font-size: 12px; font-weight: 500;
  border-radius: var(--r-md); color: var(--gray-600);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  text-decoration: none; transition: all var(--t-fast); cursor: pointer;
}
.social-link:hover { color: var(--brand); border-color: var(--brand-subtle); background: var(--brand-wash); }
.social-link i { width: 14px; height: 14px; }


/* ============ SMART LIST SIDEBAR ============ */

.smart-list-items { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 0 var(--s-2); }

.smart-list-item {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3);
  border-radius: var(--r-md); cursor: pointer;
  transition: all var(--t-fast); position: relative;
  margin-bottom: 1px; min-width: 0;
}
.smart-list-item:hover { background: var(--gray-50); }
.smart-list-item.active { background: var(--brand-wash); }
.smart-list-item.active .sl-name { color: var(--brand); font-weight: 600; }
.smart-list-item.active .sl-count { color: var(--brand); }

.sl-dot {
  width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0;
}
.sl-dot.all    { background: var(--gray-400); }
.sl-dot.blue   { background: var(--tag-blue); }
.sl-dot.green  { background: var(--tag-green); }
.sl-dot.orange { background: var(--tag-orange); }
.sl-dot.purple { background: var(--tag-purple); }
.sl-dot.teal   { background: var(--brand); }
.sl-dot.red    { background: var(--error); }
.sl-dot.amber  { background: var(--tag-amber); }
.sl-dot.rose   { background: var(--tag-rose); }
.sl-dot.indigo { background: var(--tag-indigo); }

.sl-name {
  flex: 1; min-width: 0; font-size: 13px; color: var(--gray-700); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sl-count {
  font-size: 11px; color: var(--gray-400); font-family: var(--font-mono);
  font-weight: 500; flex-shrink: 0;
}
.sl-menu-btn {
  width: 20px; height: 20px; border: none; background: none;
  color: var(--gray-300); cursor: pointer; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all var(--t-fast); flex-shrink: 0;
}
.smart-list-item:hover .sl-menu-btn { opacity: 1; }
.sl-menu-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.sl-menu-btn i { width: 14px; height: 14px; }


/* ============ BULK SELECTION BAR ============ */

@keyframes slideUpBounce {
  0%   { transform: translateX(-50%) translateY(100%); opacity: 0; }
  70%  { transform: translateX(-50%) translateY(-4px); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.bulk-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: var(--white);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-xl);
  display: flex; align-items: center; gap: var(--s-4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.24), 0 0 0 1px rgba(255,255,255,0.06);
  animation: slideUpBounce 0.3s ease;
  z-index: 80;
}
.bulk-bar-left { display: flex; align-items: center; gap: var(--s-3); }
.bulk-bar-avatars { display: flex; }
.bulk-bar-avatars .vt-avatar {
  width: 28px; height: 28px; font-size: 10px;
  margin-left: -6px; border: 2px solid var(--gray-900);
}
.bulk-bar-avatars .vt-avatar:first-child { margin-left: 0; }
.bulk-bar-count {
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.bulk-bar-clear {
  font-size: 12px; color: var(--gray-400); cursor: pointer;
  background: none; border: none; text-decoration: underline;
  transition: color var(--t-fast);
}
.bulk-bar-clear:hover { color: var(--white); }
.bulk-bar-right { display: flex; gap: var(--s-2); }
.bulk-bar-btn {
  display: inline-flex; align-items: center; gap: var(--s-1-5);
  padding: var(--s-2) var(--s-3); font-size: 12px; font-weight: 600;
  border-radius: var(--r-md); border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08); color: var(--white);
  cursor: pointer; transition: all var(--t-fast);
  font-family: var(--font-sans);
}
.bulk-bar-btn:hover { background: rgba(255,255,255,0.15); }
.bulk-bar-btn.primary {
  background: var(--brand); border-color: var(--brand);
}
.bulk-bar-btn.primary:hover { filter: brightness(1.1); }
.bulk-bar-btn i { width: 14px; height: 14px; }


/* ============ STATS BAR (per-property outreach) ============ */

.stats-bar {
  display: flex; align-items: center; gap: var(--s-2);
  flex-wrap: wrap; margin-bottom: var(--s-4);
}

.stat-pill {
  display: flex; align-items: center; gap: var(--s-1-5);
  font-size: 12px; font-weight: 500; color: var(--gray-600);
  padding: var(--s-1-5) var(--s-3);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-full);
  cursor: pointer; transition: all 0.15s;
}
.stat-pill:hover { border-color: var(--gray-300); background: var(--gray-50); }
.stat-pill.active { border-color: var(--brand); background: var(--brand-wash); color: var(--brand); }

.stat-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.stat-dot.total         { background: var(--brand); }
.stat-dot.not-contacted { background: var(--gray-300); }
.stat-dot.sent          { background: var(--info); }
.stat-dot.replied       { background: var(--success); }
.stat-dot.bounced       { background: var(--error); }
.stat-dot.scheduled     { background: var(--tag-purple); }

.stat-count { font-weight: 700; color: var(--gray-800); }
.stat-divider {
  width: 1px; height: 20px; background: var(--gray-200); margin: 0 var(--s-1);
}
.stat-rate {
  display: flex; align-items: center; gap: var(--s-1-5);
  font-size: 12px; font-weight: 600; color: var(--brand);
  padding: var(--s-1-5) var(--s-3);
  background: var(--brand-wash);
  border: 1px solid var(--brand-subtle);
  border-radius: var(--r-full);
}
.stat-rate i { width: 13px; height: 13px; }


/* ============ FOLLOW-UP BANNER ============ */

.followup-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  background: var(--accent-wash);
  border: 1px solid rgba(246,141,46,0.15);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-4);
}
.followup-left {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--gray-700);
}
.followup-left i { width: 18px; height: 18px; color: var(--accent); }
.followup-left strong { font-weight: 600; color: var(--gray-900); }
.followup-btn {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600; color: var(--white);
  background: var(--accent); border: none;
  padding: var(--s-1-5) var(--s-4);
  border-radius: var(--r-md);
  cursor: pointer; display: flex; align-items: center; gap: var(--s-1-5);
  transition: all 0.15s;
}
.followup-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.followup-btn i { width: 14px; height: 14px; }


/* ============ VENDOR TABLE (v2) ============
   Grid-based table for both directory + per-property outreach.
   Directory uses 7-col layout; per-property uses similar with variations.
*/

.vt-header {
  display: grid;
  grid-template-columns: 40px 1fr 140px 160px 120px 120px 40px;
  align-items: center;
  padding: 0 var(--s-4);
  height: 40px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.vt-header input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand);
}

.vt-row {
  display: grid;
  grid-template-columns: 40px 1fr 140px 160px 120px 120px 40px;
  align-items: center;
  padding: 0 var(--s-4);
  min-height: 56px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: all 0.15s;
}
.vt-row:hover { background: var(--brand-wash); }
.vt-row.expanded { background: var(--brand-wash); border-bottom-color: var(--brand-subtle); }
.vt-row.selected { background: rgba(72,122,123,0.04); }
.vt-row input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand);
}

.vt-vendor-cell {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0;
}
.vt-expand {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s;
}
.vt-expand i { width: 14px; height: 14px; color: var(--gray-400); }
.vt-row.expanded .vt-expand { transform: rotate(90deg); }

/* Vendor avatar (shared across table, detail panel, bulk bar) */
.vt-avatar {
  width: 34px; height: 34px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--white);
  flex-shrink: 0; letter-spacing: 0.02em;
}
.vt-avatar.rose   { background: var(--tag-rose); }
.vt-avatar.indigo { background: var(--tag-indigo); }
.vt-avatar.teal   { background: var(--brand); }
.vt-avatar.orange { background: var(--tag-orange); }
.vt-avatar.purple { background: var(--tag-purple); }
.vt-avatar.blue   { background: var(--tag-blue); }
.vt-avatar.green  { background: var(--tag-green); }
.vt-avatar.amber  { background: var(--tag-amber); }
.vt-avatar.gray   { background: var(--gray-400); }
.vt-avatar.lg  { width: 44px; height: 44px; font-size: 14px; border-radius: var(--r-xl); }
.vt-avatar.xl  { width: 48px; height: 48px; font-size: 15px; border-radius: var(--r-xl); }

.vt-vendor-info { min-width: 0; }
.vt-vendor-name {
  font-size: 13px; font-weight: 600; color: var(--gray-900);
  display: flex; align-items: center; gap: var(--s-1-5);
  white-space: nowrap;
}
.vt-vendor-name .ghl-sync { width: 13px; height: 13px; color: var(--brand-light); }
.vt-vendor-name .priority-flame { width: 13px; height: 13px; color: var(--accent); }
.vt-vendor-company {
  font-size: 11px; color: var(--gray-400); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Roles cell (flex wrap for multiple badges) */
.vt-roles { display: flex; flex-wrap: wrap; gap: 3px; }

/* Tags cell (overflow handling) */
.vt-tags { display: flex; flex-wrap: wrap; gap: 3px; overflow: hidden; max-height: 40px; }
.vt-tags-overflow {
  font-size: 10px; font-weight: 600; color: var(--gray-400);
  padding: 2px 6px; white-space: nowrap;
}

/* Table cell text defaults */
.vt-email { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-properties { font-size: 12px; color: var(--gray-600); font-weight: 500; }
.vt-last-activity { font-size: 11px; color: var(--gray-400); white-space: nowrap; }

/* Row action button (three-dot menu) */
.vt-action-btn {
  width: 28px; height: 28px; border: none; background: none;
  color: var(--gray-400); cursor: pointer; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); opacity: 0;
}
.vt-row:hover .vt-action-btn { opacity: 1; }
.vt-action-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.vt-action-btn i { width: 16px; height: 16px; }

/* Grid cell defaults for per-property outreach table */
.threads-cell { font-size: 12px; color: var(--gray-600); }
.threads-count { font-weight: 600; display: block; }
.threads-detail { font-size: 11px; color: var(--gray-400); }

.status-cell { display: flex; align-items: center; }

.activity-cell {
  font-size: 11px; color: var(--gray-400); white-space: nowrap;
  font-family: var(--font-mono); letter-spacing: -0.01em;
}

.actions-cell { display: flex; align-items: center; justify-content: center; }

/* Status pill (sent/replied/not-contacted) */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status-pill.replied       { background: rgba(16,185,129,0.1); color: var(--success); }
.status-pill.sent          { background: rgba(59,130,246,0.1); color: var(--info); }
.status-pill.not-contacted { background: var(--gray-100); color: var(--gray-400); }
.status-pill.scheduled     { background: rgba(139,92,246,0.08); color: var(--tag-purple); }
.status-pill.bounced       { background: rgba(239,68,68,0.1); color: var(--error); }
.status-pill.not_contacted { background: var(--gray-100); color: var(--gray-400); }
.status-pill.draft         { background: var(--gray-100); color: var(--gray-400); }

/* Await badge (needs follow-up indicator) */
.await-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: rgba(245,158,11,0.1); color: var(--warning);
}
.await-badge i { width: 12px; height: 12px; }

/* Threads expand panel (sits below the vendor row) */
.threads-panel {
  padding: var(--s-3) var(--s-4) var(--s-3) 80px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  animation: fadeInDown 0.2s ease;
}
.tp-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.tp-label {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tp-new-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: var(--r-md);
  border: 1px solid var(--brand-subtle); background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--brand);
  cursor: pointer; transition: all var(--t-fast);
}
.tp-new-btn:hover { background: var(--brand-wash); border-color: var(--brand); }
.tp-new-btn i { width: 14px; height: 14px; }

/* Vendor table wrapper */
.vendor-table {
  border: 1px solid var(--gray-200); border-radius: var(--r-xl);
  overflow: visible; background: var(--white);
}

/* Table footer */
.table-footer {
  padding: var(--s-3) var(--s-4);
  font-size: 11px; color: var(--gray-400); text-align: center;
  background: var(--gray-50); border-top: 1px solid var(--gray-200);
}


/* ============ THREAD CARDS (per-property outreach expand rows) ============ */

.thread-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-2);
  display: flex; gap: var(--s-3);
  cursor: pointer; transition: all 0.15s;
  position: relative; overflow: hidden;
}
.thread-card:hover {
  border-color: var(--gray-300); box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}
.thread-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.thread-card.tc-replied::before       { background: var(--success); }
.thread-card.tc-sent::before          { background: var(--info); }
.thread-card.tc-not-contacted::before { background: var(--gray-300); }
.thread-card.tc-scheduled::before     { background: var(--tag-purple); }
.thread-card.tc-bounced::before       { background: var(--error); }

.tc-body { flex: 1; min-width: 0; }
.tc-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-1);
}
.tc-subject {
  font-size: 13px; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; margin-right: var(--s-3);
}
.tc-meta {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 11px; color: var(--gray-400); flex-shrink: 0;
}
.tc-meta-item { display: flex; align-items: center; gap: 3px; }
.tc-meta-item i { width: 12px; height: 12px; }
.tc-snippet {
  font-size: 12px; color: var(--gray-500); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: var(--s-1);
}
.tc-bottom {
  display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2);
}


/* ============ VENDOR DETAIL PANEL (shared slide-out) ============
   Used by both directory page and per-property vendor tab.
   Prefix: .dp-* (detail panel)
*/

.dp-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.2); z-index: var(--z-panel-backdrop);
  animation: fadeIn 0.2s ease;
}

.dp-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 100vw; background: var(--white);
  box-shadow: var(--shadow-panel); z-index: var(--z-panel);
  display: flex; flex-direction: column;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
.dp-header {
  padding: var(--s-5); border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
}
.dp-header-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.dp-identity { display: flex; align-items: flex-start; gap: var(--s-3); }
.dp-name-block { min-width: 0; }
.dp-name {
  font-size: 16px; font-weight: 700; color: var(--gray-900);
  display: flex; align-items: center; gap: var(--s-1-5);
}
.dp-name .active-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0;
}
.dp-company { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.dp-title { font-size: 11px; color: var(--gray-400); margin-top: 1px; font-style: italic; }
.dp-close {
  width: 28px; height: 28px; border-radius: var(--r-md);
  border: 1px solid var(--gray-200); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all var(--t-fast);
}
.dp-close:hover { background: var(--gray-50); }
.dp-close i { width: 14px; height: 14px; color: var(--gray-500); }

.dp-badges {
  display: flex; align-items: center; gap: var(--s-1-5); flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.dp-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: var(--r-full); display: flex; align-items: center; gap: 3px;
  white-space: nowrap;
}
.dp-badge i { width: 11px; height: 11px; }
.dp-badge.ghl { background: var(--brand-wash); color: var(--brand); border: 1px solid var(--brand-subtle); }
.dp-badge.priority { background: var(--accent-wash); color: var(--accent); border: 1px solid rgba(246,141,46,0.2); }
.dp-badge.active-badge { background: rgba(16,185,129,0.08); color: #059669; border: 1px solid rgba(16,185,129,0.15); }
.dp-badge.inactive-badge { background: var(--tag-gray-wash); color: var(--tag-gray); border: 1px solid rgba(113,113,122,0.15); }

.dp-roles { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Body */
.dp-body {
  flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5);
}

.dp-section { margin-bottom: var(--s-5); }
.dp-section:last-child { margin-bottom: 0; }
.dp-section-title {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: var(--s-3);
  display: flex; align-items: center; gap: var(--s-1-5);
}
.dp-section-title i { width: 14px; height: 14px; }

/* Contact info grid */
.dp-info-grid {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-1-5) var(--s-3);
  font-size: 12px;
}
.dp-info-label { color: var(--gray-400); font-weight: 500; white-space: nowrap; }
.dp-info-value { color: var(--gray-700); }
.dp-info-value a { color: var(--brand); text-decoration: none; }
.dp-info-value a:hover { text-decoration: underline; }
.dp-info-value .mono { font-family: var(--font-mono); font-size: 11px; color: var(--gray-400); }

/* Deal preferences */
.dp-pref-row { margin-bottom: var(--s-3); }
.dp-pref-row:last-child { margin-bottom: 0; }
.dp-pref-label {
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--s-1);
}
.dp-pref-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.dp-pref-pill {
  display: inline-flex; padding: 2px 8px; font-size: 11px; font-weight: 500;
  border-radius: var(--r-full); color: var(--gray-600); background: var(--white);
  border: 1px solid var(--gray-200);
}
.dp-pref-value { font-size: 13px; font-weight: 600; color: var(--gray-800); font-family: var(--font-mono); }

/* Tags wrap */
.dp-tags-wrap { display: flex; flex-wrap: wrap; gap: var(--s-1-5); }

.dp-add-tag-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; font-size: 11px; font-weight: 500;
  border-radius: var(--r-full); color: var(--gray-400);
  border: 1px dashed var(--gray-300); background: none;
  cursor: pointer; transition: all var(--t-fast);
  font-family: var(--font-sans);
}
.dp-add-tag-btn:hover { border-color: var(--brand); color: var(--brand); }
.dp-add-tag-btn i { width: 12px; height: 12px; }

/* Community badges */
.dp-community-row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.dp-community-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 11px; font-weight: 600;
  border-radius: var(--r-full); color: var(--tag-amber);
  background: var(--tag-amber-wash);
}
.dp-community-pill i { width: 13px; height: 13px; }
.dp-community-meta { font-size: 12px; color: var(--gray-500); }
.dp-community-meta strong { color: var(--gray-700); font-weight: 600; }

/* Property rows (in directory detail panel) */
.dp-property-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md);
  transition: background var(--t-fast); cursor: pointer;
}
.dp-property-row:hover { background: var(--gray-50); }
.dp-property-info { flex: 1; min-width: 0; }
.dp-property-address { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.dp-property-date { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
.dp-property-status {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 2px 8px; font-size: 11px; font-weight: 600;
  border-radius: var(--r-full); white-space: nowrap;
}
.dp-property-status.sent { color: var(--info); background: var(--info-wash); }
.dp-property-status.replied { color: var(--success); background: var(--success-wash); }
.dp-property-status.no-response { color: var(--gray-500); background: var(--gray-100); }

/* Property outreach thread cards (in per-property detail panel) */
.dp-thread-card {
  padding: var(--s-2) var(--s-3); border-radius: var(--r-md);
  border: 1px solid var(--gray-200); margin-bottom: var(--s-2);
  cursor: pointer; transition: all var(--t-fast);
  position: relative; padding-left: calc(var(--s-3) + 4px);
}
.dp-thread-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 3px 0 0 3px;
}
.dp-thread-card:hover { border-color: var(--gray-300); background: var(--gray-50); }
.dp-thread-card.tc-replied::before { background: var(--success); }
.dp-thread-card.tc-sent::before { background: var(--info); }
.dp-tc-subject { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 2px; }
.dp-tc-meta { font-size: 11px; color: var(--gray-400); display: flex; align-items: center; gap: var(--s-2); }

.dp-link {
  font-size: 12px; font-weight: 500; color: var(--brand);
  display: flex; align-items: center; gap: var(--s-1);
  cursor: pointer; margin-top: var(--s-2);
  transition: color var(--t-fast);
}
.dp-link:hover { color: var(--brand-dark); }
.dp-link i { width: 14px; height: 14px; }

/* Activity timeline */
.dp-timeline { display: flex; flex-direction: column; }
.dp-timeline-item {
  display: flex; gap: var(--s-3); padding: var(--s-2) 0;
}
.dp-timeline-track {
  display: flex; flex-direction: column; align-items: center; width: 20px; flex-shrink: 0;
}
.dp-timeline-dot {
  width: 8px; height: 8px; border-radius: var(--r-full);
  border: 2px solid var(--brand); background: var(--white); flex-shrink: 0; z-index: 1;
}
.dp-timeline-dot.mail   { border-color: var(--info); }
.dp-timeline-dot.open   { border-color: var(--success); }
.dp-timeline-dot.reply  { border-color: var(--success); background: var(--success); }
.dp-timeline-dot.system { border-color: var(--gray-300); }
.dp-timeline-dot.import { border-color: var(--accent); background: var(--accent); }
.dp-timeline-line {
  width: 2px; flex: 1; background: var(--gray-200); min-height: 12px;
}
.dp-timeline-content { flex: 1; min-width: 0; }
.dp-timeline-text { font-size: 13px; color: var(--gray-700); }
.dp-timeline-text strong { font-weight: 600; color: var(--gray-900); }
.dp-timeline-time { font-size: 11px; color: var(--gray-400); margin-top: 1px; }

/* Footer */
.dp-footer {
  padding: var(--s-4) var(--s-5); border-top: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: var(--s-2);
  flex-shrink: 0; background: var(--white);
}
.dp-btn {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-md);
  cursor: pointer; display: flex; align-items: center; gap: var(--s-1-5);
  transition: all 0.15s; border: none;
}
.dp-btn i { width: 14px; height: 14px; }
.dp-btn.primary { background: var(--brand); color: var(--white); }
.dp-btn.primary:hover { background: var(--brand-dark); }
.dp-btn.outline {
  background: var(--white); color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.dp-btn.outline:hover { border-color: var(--gray-300); background: var(--gray-50); }
.dp-btn.danger {
  background: none; color: var(--error); border: none; font-weight: 500;
  margin-left: auto;
}
.dp-btn.danger:hover { background: rgba(239,68,68,0.06); }


/* ========================================================================
   PHASE 7.3 — DIRECTORY V2 LAYOUT
   2-column layout with smart list sidebar + main content area.
   ======================================================================== */

/* --- Directory v2 two-column layout --- */
/* Override .vd-page constraints when in v2 layout */
.vd-page.vd-v2-layout {
  max-width: none;
  padding: 0;
  margin: 0;
  display: flex;
  min-height: calc(100vh - 56px);
}

.vd-sidebar {
  width: 220px;
  max-width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--gray-200);
  padding: var(--s-5) 0 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vd-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-4) var(--s-3);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: var(--s-2);
}
.sl-add-btn {
  width: 22px; height: 22px; border: none; border-radius: var(--r-sm);
  background: none; color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.sl-add-btn:hover { background: var(--gray-100); color: var(--gray-600); }
.sl-hint {
  padding: var(--s-3) var(--s-4); font-size: 11px; color: var(--gray-400);
  line-height: 1.4; border-top: 1px solid var(--gray-100); margin-top: auto;
}

.vd-v2-layout .vd-main {
  flex: 1;
  min-width: 0;
  padding: var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* --- Contact cell (name + GHL icon) --- */
.vd-contact-cell {
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  white-space: nowrap;
}

/* --- Roles cell — flex-wrap for multiple badges --- */
.vd-roles-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* --- Tags cell — flex-wrap with overflow --- */
.vd-tags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* --- Email cell --- */
.vd-email-cell {
  font-size: 12px;
  color: var(--gray-500);
}

/* --- Activity cell --- */
.vd-activity-cell {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* --- Active filter pill for smart list --- */
.vd-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--r-full);
  background: var(--brand-wash);
  color: var(--brand);
  border: 1px solid var(--brand-subtle);
}

.vd-filter-pill-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--brand);
  opacity: 0.6;
}
.vd-filter-pill-x:hover { opacity: 1; }

/* --- Add Filter button (dashed pill) --- */
.vd-add-filter-wrap {
  position: relative;
}
.vd-add-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--r-full);
  background: none;
  color: var(--gray-400);
  border: 1px dashed var(--gray-300);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.vd-add-filter-btn:hover {
  color: var(--brand);
  border-color: var(--brand-subtle);
  background: var(--brand-wash);
}

/* --- Filter dropdown menu --- */
.vd-filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-modal);
  padding: var(--s-1) 0;
}
.vd-filter-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gray-100);
}
.vd-filter-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.vd-filter-back-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}
.vd-filter-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s-2) var(--s-3);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--gray-700);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast);
  text-align: left;
}
.vd-filter-dropdown-item:hover:not(.disabled) {
  background: var(--gray-50);
  color: var(--gray-900);
}
.vd-filter-dropdown-item.disabled {
  opacity: 0.5;
  cursor: default;
}

/* --- Show inactive checkbox label --- */
.vd-show-inactive {
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  font-size: 12px;
  color: var(--gray-500);
  cursor: pointer;
}
.vd-show-inactive input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* --- Bulk bar divider (between count and actions) --- */
.bulk-bar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
}

/* =====================================================================
   SMART LIST BUILDER MODAL (Phase 7.9)
   ===================================================================== */

/* Name row: input + color picker */
.slb-name-row {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-5);
}
.slb-name-input {
  flex: 1;
  padding: var(--s-2) var(--s-3);
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--t-fast);
}
.slb-name-input:focus { border-color: var(--brand); }

/* Color picker dots */
.slb-color-picker {
  display: flex;
  gap: var(--s-2);
}
.slb-color-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--t-fast);
}
.slb-color-dot:hover { transform: scale(1.15); }
.slb-color-dot.selected {
  border-color: var(--gray-900);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-400);
}

/* Filter logic label */
.slb-logic-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: var(--s-3);
}
.slb-logic-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-wash);
  padding: 2px 8px;
  border-radius: var(--r-full);
  cursor: pointer;
  border: 1px solid var(--brand-subtle);
  user-select: none;
}
.slb-logic-toggle:hover { background: rgba(72,122,123,0.12); }

/* Filter rows */
.slb-filter-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.slb-filter-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
}
.slb-filter-select {
  padding: var(--s-1-5) var(--s-2);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  background: var(--white);
  outline: none;
  cursor: pointer;
  min-width: 0;
}
.slb-filter-select:focus { border-color: var(--brand); }
.slb-filter-value {
  flex: 1;
  padding: var(--s-1-5) var(--s-2);
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  background: var(--white);
  outline: none;
  min-width: 80px;
}
.slb-filter-value:focus { border-color: var(--brand); }

/* Smart List Builder — Suggestions dropdown */
.slb-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}
.slb-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--gray-700);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
}
.slb-suggestion-item:hover { background: var(--gray-50); }
.slb-suggestion-item.selected {
  background: var(--brand-wash);
  color: var(--brand);
  font-weight: 500;
}

/* GHL Search Modal — Redesigned with filter rows */
.ghl-search-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.ghl-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ghl-filter-select {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  color: var(--gray-700);
  background: var(--white);
  outline: none;
}
.ghl-filter-select:focus { border-color: var(--brand); }
.ghl-filter-value-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.ghl-filter-value {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  width: 100%;
}
.ghl-filter-value:focus { border-color: var(--brand); }
.ghl-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}
.ghl-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--gray-700);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
}
.ghl-suggestion-item:hover { background: var(--gray-50); }
.ghl-suggestion-item.selected {
  background: var(--brand-wash);
  color: var(--brand);
  font-weight: 500;
}
.ghl-filter-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--gray-300);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.ghl-filter-remove:hover { color: var(--error); background: var(--error-wash); }
.ghl-filter-remove i { width: 14px; height: 14px; }
.ghl-add-condition {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-400);
  background: none;
  border: 1px dashed var(--gray-200);
  border-radius: var(--r-md);
  padding: 6px 12px;
  cursor: pointer;
  margin-top: 4px;
  width: fit-content;
}
.ghl-add-condition:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-wash); }
.ghl-add-condition i { width: 14px; height: 14px; }
.ghl-active-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ghl-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-dark);
  border: none;
  cursor: pointer;
}
.ghl-active-pill:hover { background: #ddeeed; }
.ghl-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 8px;
}
.ghl-search-summary-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
}

.slb-filter-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--gray-300);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.slb-filter-remove:hover { color: var(--error); background: var(--error-wash); }
.slb-filter-remove i { width: 14px; height: 14px; }

/* Add condition button */
.slb-add-condition {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  margin-top: var(--s-2);
  padding: var(--s-1-5) var(--s-3);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  transition: all var(--t-fast);
}
.slb-add-condition:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-wash);
}
.slb-add-condition i { width: 14px; height: 14px; }

/* Preview box */
.slb-preview {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-top: var(--s-4);
}
.slb-preview-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--s-3);
}
.slb-preview-header i { width: 14px; height: 14px; color: var(--brand); }
.slb-preview-count {
  font-family: var(--font-mono);
  color: var(--brand);
  font-weight: 700;
}
.slb-preview-refresh {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  padding: 2px;
  border-radius: var(--r-sm);
}
.slb-preview-refresh:hover { color: var(--brand); background: var(--brand-wash); }
.slb-preview-refresh i { width: 14px; height: 14px; }
.slb-preview-rows {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.slb-preview-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1-5) var(--s-2);
  font-size: 12px;
  color: var(--gray-600);
  background: var(--white);
  border-radius: var(--r-sm);
}
.slb-preview-row-name {
  font-weight: 500;
  color: var(--gray-700);
}
.slb-preview-more {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: var(--s-2);
}
.slb-preview-empty {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  padding: var(--s-3);
}

/* Smart list item — edit button (hover reveal) */
.smart-list-item .sl-edit-btn {
  display: none;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.smart-list-item .sl-edit-btn i { width: 12px; height: 12px; }
.smart-list-item:hover .sl-edit-btn { display: flex; }
.smart-list-item:hover .sl-edit-btn:hover { color: var(--brand); background: var(--brand-wash); }

/* Custom smart list separator */
.sl-separator {
  height: 1px;
  background: var(--gray-200);
  margin: var(--s-2) var(--s-2);
}

/* =========================================================================
   Vendor Settings — Phase 7.12 (Full-Width Stacked Sections)
   Design: Collapsible tag groups with pill layout, full-width smart lists,
   polished permission cards matching rule-card pattern
   ========================================================================= */

/* ── Directory link card ── */
.vs-directory-link {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-6);
  background: linear-gradient(135deg, rgba(72,122,123,0.04), rgba(72,122,123,0.08));
  border: 1px solid rgba(72,122,123,0.15); border-radius: var(--r-lg);
  cursor: pointer; transition: all var(--t-fast);
}
.vs-directory-link:hover {
  border-color: rgba(72,122,123,0.3);
  box-shadow: var(--shadow-sm);
}
.vs-directory-link-icon {
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--brand); color: var(--white);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vs-directory-link-icon i { width: 18px; height: 18px; }
.vs-directory-link-text { flex: 1; }
.vs-directory-link-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.vs-directory-link-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.vs-directory-link-arrow { color: var(--brand); flex-shrink: 0; }
.vs-directory-link-arrow i { width: 18px; height: 18px; }

/* ── Section headers (full-width, matches set-section-title) ── */
.vs-section { margin-top: var(--s-6); }
.vs-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-4);
}
.vs-section-title {
  font-size: 15px; font-weight: 700; color: var(--gray-800);
  letter-spacing: -0.2px;
  display: flex; align-items: center; gap: var(--s-2);
}
.vs-section-title::before {
  content: ''; width: 3px; height: 16px;
  background: var(--brand); border-radius: 2px;
}
.vs-section-title i { width: 16px; height: 16px; color: var(--brand); }
.vs-section-count {
  font-size: 12px; color: var(--gray-400); font-family: var(--font-mono);
}
.vs-section-desc {
  font-size: 12px; color: var(--gray-500); margin-bottom: var(--s-4); line-height: 1.5;
}

/* ── Search bar (full-width) ── */
.vs-search {
  width: 100%; padding: var(--s-2) var(--s-3); font-size: 13px;
  font-family: var(--font-sans); color: var(--gray-700);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  outline: none; margin-bottom: var(--s-4); box-sizing: border-box;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.vs-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* ── Collapsible tag group ── */
.vs-tag-group {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); margin-bottom: var(--s-3);
  overflow: hidden; transition: box-shadow var(--t-fast);
}
.vs-tag-group:hover { box-shadow: var(--shadow-sm); }
.vs-tag-group-header {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); cursor: pointer;
  transition: background var(--t-fast); user-select: none;
}
.vs-tag-group-header:hover { background: var(--gray-50); }
.vs-tag-group-chevron {
  width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0;
  transition: transform 200ms ease;
}
.vs-tag-group-chevron.open { transform: rotate(90deg); }
.vs-tag-group-dot {
  width: 10px; height: 10px; border-radius: var(--r-full); flex-shrink: 0;
}
.vs-tag-group-dot.role   { background: var(--tag-blue); }
.vs-tag-group-dot.market { background: var(--brand); }
.vs-tag-group-dot.source { background: var(--tag-amber); }
.vs-tag-group-dot.other  { background: var(--gray-400); }
.vs-tag-group-dot.ghl   { background: var(--tag-teal, #14b8a6); }
.vs-tag-group-name {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.vs-tag-group-count {
  font-size: 11px; color: var(--gray-400); font-family: var(--font-mono);
}

/* Tag pills container (inside expanded group) */
.vs-tag-pills {
  padding: 0 var(--s-4) var(--s-4);
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 240px; overflow-y: auto;
}

/* Individual tag pill */
.vs-tag-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px; border-radius: var(--r-full);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  font-size: 12px; color: var(--gray-600); font-weight: 500;
  transition: all var(--t-fast); cursor: default;
  max-width: 240px;
}
.vs-tag-pill:hover {
  background: var(--white); border-color: var(--gray-300);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.vs-tag-pill-dot {
  width: 7px; height: 7px; border-radius: var(--r-full); flex-shrink: 0;
}
.vs-tag-pill-dot.role   { background: var(--tag-blue); }
.vs-tag-pill-dot.market { background: var(--brand); }
.vs-tag-pill-dot.source { background: var(--tag-amber); }
.vs-tag-pill-dot.other  { background: var(--gray-400); }
.vs-tag-pill-dot.ghl   { background: var(--tag-teal, #14b8a6); }

/* GHL-only tag styling */
.vs-tag-pill.ghl-only {
  border-color: rgba(20,184,166,0.3); background: rgba(20,184,166,0.06);
}
.vs-tag-ghl-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--tag-teal, #14b8a6); text-transform: uppercase;
  padding: 1px 5px; border-radius: var(--r-sm);
  background: rgba(20,184,166,0.12);
}
.vs-tag-pill-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vs-tag-pill-count {
  font-size: 10px; color: var(--gray-400); font-family: var(--font-mono);
  flex-shrink: 0;
}
.vs-tag-pill-x {
  width: 14px; height: 14px; border: none; background: none;
  color: var(--gray-300); cursor: pointer; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all var(--t-fast); flex-shrink: 0;
  margin-left: 2px; padding: 0;
}
.vs-tag-pill:hover .vs-tag-pill-x { opacity: 1; }
.vs-tag-pill-x:hover { color: var(--error); background: var(--error-wash); }
.vs-tag-pill-x i { width: 10px; height: 10px; }

/* ── Add tag row ── */
.vs-add-row {
  display: flex; gap: var(--s-2); margin-top: var(--s-4); align-items: center;
}
.vs-add-input {
  flex: 1; padding: 8px var(--s-3); font-size: 13px;
  font-family: var(--font-sans); border: 1px solid var(--gray-200);
  border-radius: var(--r-md); outline: none; box-sizing: border-box;
  transition: border-color var(--t-fast);
}
.vs-add-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

/* ── Smart list rows (full width) ── */
.vs-sl-list {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
}
.vs-sl-list.scrollable { max-height: 280px; overflow-y: auto; }
.vs-sl-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--t-fast);
}
.vs-sl-row:last-child { border-bottom: none; }
.vs-sl-row:hover { background: var(--gray-50); }
.vs-sl-info { flex: 1; min-width: 0; }
.vs-sl-name { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.vs-sl-filter {
  font-size: 11px; color: var(--gray-400); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vs-sl-meta {
  font-size: 12px; color: var(--gray-500); white-space: nowrap;
  font-family: var(--font-mono); flex-shrink: 0; min-width: 28px; text-align: right;
}
.vs-sl-actions {
  display: flex; gap: var(--s-1); flex-shrink: 0;
  opacity: 0; transition: opacity var(--t-fast);
}
.vs-sl-row:hover .vs-sl-actions { opacity: 1; }
.vs-sl-action {
  width: 26px; height: 26px; border: none; background: none;
  color: var(--gray-400); cursor: pointer; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.vs-sl-action:hover { color: var(--gray-700); background: var(--gray-100); }
.vs-sl-action.delete:hover { color: var(--error); background: var(--error-wash); }
.vs-sl-action i { width: 14px; height: 14px; }

/* CTA button */
.vs-cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2); padding: 10px 20px; font-size: 13px; font-weight: 600;
  font-family: var(--font-sans); color: var(--white); background: var(--brand);
  border: none; border-radius: var(--r-md); cursor: pointer;
  transition: all var(--t-fast); box-shadow: var(--shadow-brand);
  margin-top: var(--s-4);
}
.vs-cta-btn:hover { filter: brightness(0.92); box-shadow: 0 6px 18px rgba(72,122,123,0.25); }
.vs-cta-btn:active { transform: scale(0.98); }
.vs-cta-btn i { width: 14px; height: 14px; }

/* ── Empty state ── */
.vs-empty {
  padding: var(--s-8) var(--s-6); text-align: center;
  color: var(--gray-400); font-size: 13px; line-height: 1.5;
}
.vs-empty i {
  width: 28px; height: 28px; display: block;
  margin: 0 auto var(--s-3); color: var(--gray-300);
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSE PICKER V2 — Popover-based property & template selectors
   Prefix: cp- (compose-picker)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Trigger button (replaces native <select>) ── */
.cp-trigger {
  flex: 1; display: flex; align-items: center; gap: 6px;
  padding: 5px 0; cursor: pointer; min-width: 0;
  background: none; border: none; text-align: left;
  font-family: var(--font-sans);
  transition: all 0.15s;
}
.cp-trigger .cp-icon {
  width: 14px; height: 14px; color: var(--gray-300); flex-shrink: 0;
}
.cp-trigger .cp-text {
  font: 400 13px/1 var(--font-sans); color: var(--gray-400);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-trigger .cp-chev {
  width: 12px; height: 12px; color: var(--gray-300); flex-shrink: 0;
  transition: transform 0.15s;
}
.cp-trigger:hover .cp-text { color: var(--gray-500); }

/* Selected state */
.cp-trigger.sel .cp-text { color: var(--gray-800); font-weight: 500; }
.cp-trigger.sel .cp-bar {
  width: 3px; height: 14px; border-radius: 2px; flex-shrink: 0;
}
.cp-clear {
  width: 16px; height: 16px; border-radius: 4px; border: none;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); flex-shrink: 0; transition: all 0.15s;
}
.cp-clear:hover { background: rgba(239,68,68,0.08); color: #EF4444; }
.cp-clear i { width: 11px; height: 11px; }

/* Active row — brand underline when picker is open */
.compose-field.cp-picking { border-bottom-color: var(--brand); }
.compose-field.cp-picking .cp-chev { transform: rotate(180deg); }

/* ── Popover card — floating below trigger ── */
.cp-popover {
  margin: 0 12px 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg, 12px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
  position: relative;
  animation: cpPopIn 0.2s cubic-bezier(0.16,1,0.3,1);
}
.cp-popover::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brand);
}
@keyframes cpPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Search bar inside popover */
.cp-search {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.cp-search i { width: 14px; height: 14px; color: var(--gray-300); flex-shrink: 0; }
.cp-search input {
  flex: 1; border: none; outline: none; background: none;
  font: 400 13px/1 var(--font-sans); color: var(--gray-800);
  min-width: 0;
}
.cp-search input::placeholder { color: var(--gray-400); }
.cp-count {
  font: 500 10px/1 var(--font-mono); color: var(--gray-400);
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.3px;
}

/* Scrollable results list */
.cp-list {
  max-height: 232px; overflow-y: auto;
  overscroll-behavior: contain;
}
.cp-list::-webkit-scrollbar { width: 3px; }
.cp-list::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

/* Section label inside popover */
.cp-label {
  padding: 8px 14px 3px;
  font: 500 10px/1 var(--font-mono);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* "No property" / "Write from scratch" link */
.cp-skip {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  font: 400 12px/1 var(--font-sans); color: var(--gray-400);
  cursor: pointer; transition: color 0.15s;
  border-bottom: 1px solid var(--gray-100);
}
.cp-skip:hover, .cp-skip.focus { color: var(--brand); background: rgba(72,122,123,0.04); }
.cp-skip i { width: 12px; height: 12px; }

/* Property item */
.cp-prop {
  display: flex; align-items: center;
  padding: 7px 14px; cursor: pointer;
  transition: background 0.15s;
  gap: 0;
}
.cp-prop:hover { background: rgba(72,122,123,0.04); }
.cp-prop.focus { background: rgba(72,122,123,0.08); }
.cp-prop .cp-bar {
  width: 3px; align-self: stretch; min-height: 16px;
  border-radius: 2px; flex-shrink: 0; margin-right: 10px;
}
.cp-prop .cp-addr {
  font: 400 13px/1.2 var(--font-sans); color: var(--gray-700);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-prop .cp-addr mark {
  background: none; color: var(--brand-dark, #3A6465); font-weight: 600;
}
.cp-prop.dim { opacity: 0.4; }
.cp-prop.dim:hover { opacity: 0.65; }

/* Stage badge */
.cp-badge {
  font: 600 9px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.4px;
  padding: 2.5px 6px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0; margin-left: 8px;
}
.cp-badge-scr { background: rgba(59,130,246,0.08); color: #2563EB; }
.cp-badge-ai  { background: rgba(139,92,246,0.08); color: #7C3AED; }
.cp-badge-uw  { background: rgba(8,145,178,0.08); color: #0E7490; }
.cp-badge-neg { background: rgba(217,119,6,0.08); color: #B45309; }
.cp-badge-con { background: rgba(124,58,237,0.08); color: #6D28D9; }
.cp-badge-uc  { background: rgba(79,70,229,0.08); color: #4338CA; }
.cp-badge-cls { background: rgba(5,150,105,0.08); color: #047857; }
.cp-badge-won { background: rgba(4,120,87,0.08); color: #047857; }
.cp-badge-nmf { background: rgba(156,163,175,0.08); color: #6B7280; }
.cp-badge-new { background: rgba(245,158,11,0.08); color: #D97706; }

/* No results empty state */
.cp-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 14px; text-align: center; gap: 3px;
}
.cp-empty i { width: 22px; height: 22px; color: var(--gray-300); margin-bottom: 4px; }
.cp-empty strong { font: 500 13px/1.3 var(--font-sans); color: var(--gray-500); }
.cp-empty span { font: 400 11px/1.3 var(--font-sans); color: var(--gray-400); }

/* Keyboard hints footer */
.cp-kbd {
  display: flex; gap: 12px; padding: 5px 14px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  font: 400 10px/1 var(--font-sans); color: var(--gray-400);
}
.cp-kbd kbd {
  display: inline-block; padding: 1px 4px; border-radius: 3px;
  background: var(--white); border: 1px solid var(--gray-200);
  font: 500 9px/1.2 var(--font-mono); color: var(--gray-500);
  margin-right: 2px;
}

/* ── Role filter pills (template picker) ── */
.cp-roles {
  display: flex; gap: 3px; padding: 7px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.cp-role-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: var(--r-full);
  border: 1px solid var(--gray-200); background: var(--white);
  font: 500 10px/1 var(--font-sans); color: var(--gray-500);
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.cp-role-pill:hover { border-color: var(--gray-300); color: var(--gray-600); }
.cp-role-pill.on { background: rgba(72,122,123,0.05); border-color: var(--brand); color: var(--brand-dark, #3A6465); }
.cp-role-pill .cp-rd { width: 5px; height: 5px; border-radius: 50%; }

/* Template card item */
.cp-tmpl {
  padding: 8px 14px; cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--gray-50);
}
.cp-tmpl:last-child { border-bottom: none; }
.cp-tmpl:hover { background: rgba(72,122,123,0.04); }
.cp-tmpl.focus { background: rgba(72,122,123,0.08); }
.cp-tmpl-top { display: flex; align-items: center; gap: 5px; }
.cp-tmpl-name { font: 500 13px/1 var(--font-sans); color: var(--gray-800); }
.cp-tmpl-badge {
  font: 600 8px/1 var(--font-sans); padding: 2px 5px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px;
}
.cp-tb-lender { background: rgba(59,130,246,0.08); color: #2563EB; }
.cp-tb-investor { background: rgba(99,102,241,0.08); color: #6366F1; }
.cp-tb-pm { background: rgba(16,185,129,0.08); color: #059669; }
.cp-tmpl-subj {
  font: 400 12px/1.3 var(--font-sans); color: var(--gray-400);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-tmpl-subj .cp-mf { color: var(--brand); font-weight: 500; font-size: 11px; }

/* Template selected — role dots */
.cp-sel-dots { display: flex; gap: 3px; align-items: center; }
.cp-sel-dot { width: 5px; height: 5px; border-radius: 50%; }

/* ── Merge field status banner ── */
.cp-status {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 20px;
  font: 400 12px/1.4 var(--font-sans);
}
.cp-status i { width: 13px; height: 13px; flex-shrink: 0; }
.cp-status.is-ok { background: rgba(5,150,105,0.06); color: #065F46; border-bottom: 1px solid rgba(5,150,105,0.15); }
.cp-status.is-ok i { color: #059669; }
.cp-status.is-warn { background: rgba(217,119,6,0.06); color: #92400E; border-bottom: 1px solid rgba(217,119,6,0.15); }
.cp-status.is-warn i { color: #D97706; }
.cp-status a { color: var(--brand); font-weight: 500; text-decoration: underline; cursor: pointer; }

/* Merge field inline tags */
.cp-mft {
  display: inline; padding: 1px 4px; border-radius: 3px;
  font: 500 12px/1.5 var(--font-sans);
}
.cp-mft-ok { background: rgba(5,150,105,0.06); color: #065F46; border: 1px solid rgba(5,150,105,0.15); }
.cp-mft-pending { background: rgba(8,145,178,0.06); color: #0E7490; border: 1px solid rgba(8,145,178,0.15); }
.cp-mft-bad { background: rgba(217,119,6,0.06); color: #92400E; border: 1px solid rgba(217,119,6,0.15); }

/* ── Compose modal footer override for v2 — split layout ── */
.compose-modal-footer.cp-v2 {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 0 0 16px 16px;
}

/* ---------------------------------------------------------------------------
   Templates Table List View (tt-*)
   --------------------------------------------------------------------------- */

/* Table header row */
.tt-list-header {
  display: grid;
  grid-template-columns: 40px minmax(160px, 250px) 130px 1fr 80px 80px 40px;
  column-gap: 48px;
  align-items: center;
  padding: 0 16px;
  height: 40px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tt-list-header input[type="checkbox"] { justify-self: center; }

/* Table data rows */
.tt-list-row {
  display: grid;
  grid-template-columns: 40px minmax(160px, 250px) 130px 1fr 80px 80px 40px;
  column-gap: 48px;
  align-items: center;
  padding: 0 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.12s;
}
.tt-list-row:last-of-type { border-bottom: none; }
.tt-list-row:hover { background: var(--brand-wash); }
.tt-list-row.selected { background: rgba(72,122,123,0.04); }
.tt-list-row input[type="checkbox"] { justify-self: center; }

/* GHL row accent */
.tt-list-row.ghl-row { border-left: 3px solid var(--brand); }

/* Template name cell */
.tt-list-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
}
.tt-list-name > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tt-list-name:hover > span:first-child { color: var(--brand); }

/* Roles cell */
.tt-list-roles { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; overflow: hidden; justify-self: start; }

/* Subject cell */
.tt-list-subject { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.tt-list-subject span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Stats cell */
.tt-list-stats { display: flex; flex-direction: column; gap: 1px; }

/* Row entrance animation */
@keyframes tt-row-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Action menu dropdown */
.tt-action-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  min-width: 180px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  padding: 4px;
  animation: vSlideUp 0.15s ease;
}

/* Action menu items */
.tt-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.1s;
  font-family: inherit;
  text-align: left;
}
.tt-action-item:hover { background: var(--gray-50); }
.tt-action-item i { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; }
.tt-action-item:hover i { color: var(--gray-600); }
.tt-action-item.danger { color: #DC2626; }
.tt-action-item.danger:hover { background: #FEF2F2; }
.tt-action-item.danger i { color: #DC2626; }
.tt-action-item.import-action { color: var(--brand); }
.tt-action-item.import-action:hover { background: var(--brand-wash); }
.tt-action-item.import-action i { color: var(--brand); }
.tt-action-item:disabled { opacity: 0.5; cursor: not-allowed; }

/* Only elevate z-index when dropdown is actually open — avoids competing stacking contexts */
.tt-list-row .v-dropdown.v-dropdown--open { position: relative; z-index: 100; }
.tt-list-row .v-dropdown-menu { z-index: 50; }

/* Deactivated row — use color changes instead of opacity so child dropdowns aren't affected */
.tt-list-row.deactivated { background: var(--gray-50); }
.tt-list-row.deactivated:hover { background: var(--gray-100); }

/* Bulk action bar (fixed bottom) */
.tt-bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--gray-900);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06);
  animation: vSlideUp 0.25s ease;
}

/* Bulk action buttons */
.tt-bulk-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.tt-bulk-action:hover { background: rgba(255,255,255,0.16); color: white; }
.tt-bulk-action i { width: 14px; height: 14px; }
.tt-bulk-action.danger { color: #FCA5A5; }
.tt-bulk-action.danger:hover { background: rgba(220,38,38,0.2); color: #FEE2E2; }
.tt-bulk-action.import-action { color: rgba(72,122,123,0.9); }
.tt-bulk-action.import-action:hover { background: rgba(72,122,123,0.15); color: var(--brand-light); }

/* Role multi-select for template form */
.tt-role-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  background: white;
  min-height: 38px;
  cursor: pointer;
}
.tt-role-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.tt-role-option:hover { border-color: var(--gray-300); }
.tt-role-option.selected {
  border-color: transparent;
  color: white;
}
.tt-role-option .role-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
/* Role-specific selected colors */
.tt-role-option.selected.c-blue     { background: var(--tag-blue); }
.tt-role-option.selected.c-green    { background: var(--tag-green); }
.tt-role-option.selected.c-indigo   { background: var(--tag-indigo); }
.tt-role-option.selected.c-orange   { background: var(--tag-orange); }
.tt-role-option.selected.c-purple   { background: var(--tag-purple); }
.tt-role-option.selected.c-amber    { background: var(--tag-amber); }
.tt-role-option.selected.c-teal     { background: var(--tag-teal); }
.tt-role-option.selected.c-rose     { background: var(--tag-rose); }
