body { background: #f5f6f8; }

.stat-card { transition: box-shadow .15s; }
.stat-card:hover { box-shadow: 0 2px 10px rgba(10, 102, 194, .25); }

/* Lead status badges (funnel order: cool -> warm -> outcome) */
.badge[class*="status-"] { font-weight: 500; }
.status-new        { background: #e9ecef; color: #495057; }
.status-to-connect { background: #cfe2ff; color: #084298; }
.status-invited    { background: #9ec5fe; color: #052c65; }
.status-connected  { background: #0a66c2; color: #fff; }
.status-to-contact { background: #fff3cd; color: #664d03; }
.status-messaged   { background: #ffe69c; color: #664d03; }
.status-replied    { background: #a3cfbb; color: #0a3622; }
.status-met        { background: #198754; color: #fff; }
.status-won        { background: #146c43; color: #fff; }
.status-lost       { background: #dc3545; color: #fff; }

/* Company status badges */
.company-status-prospect    { background: #cfe2ff; color: #084298; }
.company-status-customer    { background: #198754; color: #fff; }
.company-status-ex-customer { background: #f8d7da; color: #842029; }
.company-status-other       { background: #e9ecef; color: #495057; }

/* Activity timeline on the person page */
.timeline { position: relative; margin: 0; }
.timeline-item { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid #e3e6ea; }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-dot { position: absolute; left: -7px; top: .15rem; width: 12px; height: 12px; border-radius: 50%; background: #0a66c2; border: 2px solid #fff; }
.timeline-item.kind-note .timeline-dot { background: #6c757d; }
.timeline-item.kind-invitation .timeline-dot { background: #fd7e14; }
.timeline-item.kind-message .timeline-dot { background: #198754; }
.timeline-item.kind-imported .timeline-dot { background: #adb5bd; }
.timeline-text { font-size: .88rem; }
.timeline-time { font-size: .72rem; }

/* Bulk-action bar */
.bulk-bar { border: 1px solid #0a66c2; background: #f0f7ff; }

/* Last-message preview in tables: max two lines */
.msg-preview {
  font-size: .8rem;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 280px;
}

/* Message history bubbles */
.chat-body { max-height: 560px; overflow-y: auto; background: #fbfcfd; }
.chat-row { display: flex; margin-bottom: .6rem; }
.chat-row.me { justify-content: flex-end; }
.chat-row.them { justify-content: flex-start; }
.chat-bubble {
  max-width: 70%;
  padding: .5rem .8rem;
  border-radius: 1rem;
  font-size: .9rem;
  white-space: pre-wrap;
}
.chat-row.me .chat-bubble { background: #0a66c2; color: #fff; border-bottom-right-radius: .2rem; }
.chat-row.them .chat-bubble { background: #e9ecef; color: #1d2129; border-bottom-left-radius: .2rem; }
.chat-time { font-size: .68rem; opacity: .7; margin-top: .2rem; text-align: right; }
