/* === pipeline.css === */

/* Pipeline selector styling */
#pipelineSelector {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}
#pipelineSelector:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
#pipelineSelector:hover {
  border-color: #94a3b8;
}
/* ======================================================
   === SECTION: PIPELINE DASHBOARD ===
   ====================================================== */
.pipeline-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px;
}
.pipeline-title { font-size: 1.6rem; font-weight: 800; color: #1e293b; line-height: 1; }
.pipeline-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 8px 14px;
  width: 280px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.search-box input { border: none; outline: none; font-family: inherit; font-size: 0.85rem; width: 100%; color: #334155; }
.search-box i { color: #94a3b8; font-size: 0.85rem; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: white; padding: 16px 14px; border-radius: 12px;
  border-top: 4px solid #e2e8f0; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-val { font-size: 1.8rem; font-weight: 900; color: #1e293b; display: block; line-height: 1; font-family: 'JetBrains Mono', monospace; }
.stat-pct { font-size: 0.65rem; font-weight: 700; color: #94a3b8; display: block; margin-top: 4px; }
.stat-label { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; color: #64748b; letter-spacing: 0.8px; margin-top: 3px; }

.sort-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}
.sort-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.8px; }
.sort-pill {
  padding: 5px 14px; border-radius: 20px;
  background: white; border: 1px solid #e2e8f0;
  color: #64748b; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.sort-pill:hover { border-color: var(--accent); color: var(--accent); }
.sort-pill.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Lead Cards */
.lead-card {
  background: white; border-radius: 14px; margin-bottom: 12px;
  border: 1px solid #e2e8f0; border-left: 6px solid #cbd5e1;
  transition: all 0.2s; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.lead-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.lead-card.out-Yes-Interested { border-left-color: var(--color-yes); }
.lead-card.out-Maybe-Interested { border-left-color: var(--color-maybe); }
.lead-card.out-Not-Interested { border-left-color: var(--color-no); }
.lead-card.out-Pending { border-left-color: var(--color-pending); }

.lead-header {
  padding: 16px 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.lead-name { font-size: 0.95rem; font-weight: 800; color: #1e293b; margin-bottom: 2px; }
.lead-meta { font-size: 0.72rem; color: #94a3b8; display: flex; gap: 10px; flex-wrap: wrap; }
.lead-meta span { display: flex; align-items: center; gap: 4px; }
.lead-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

.outcome-badge {
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 20px;
}
.badge-yes { background: #d1fae5; color: #065f46; }
.badge-maybe { background: #fef3c7; color: #92400e; }
.badge-no { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #f1f5f9; color: #64748b; }
.badge-overdue { background: #fff1f2; color: #e11d48; }

.lead-body {
  display: none; padding: 20px 24px;
  background: #fafafa; border-top: 1px solid #f1f5f9;
  border-radius: 0 0 14px 14px;
}
.lead-body.open { display: block; }

/* Lead body tabs */
.lead-body-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.lb-tab {
  padding: 5px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; background: white; border: 1px solid #e2e8f0; color: #64748b;
  font-family: inherit;
}
.lb-tab.active { background: var(--sidebar-mid); color: white; border-color: var(--sidebar-mid); }
.lb-panel { display: none; }
.lb-panel.active { display: block; }

/* Timeline / Call Log */
.timeline-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.timeline-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0; margin-top: 2px;
}
.tl-call { background: #dbeafe; color: #1d4ed8; }
.tl-note { background: #fef3c7; color: #92400e; }
.tl-quote { background: #d1fae5; color: #065f46; }
.tl-import { background: #f3e8ff; color: #7c3aed; }
.tl-status { background: #f1f5f9; color: #64748b; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-title { font-size: 0.78rem; font-weight: 700; color: #334155; }
.timeline-notes { font-size: 0.75rem; color: #64748b; margin-top: 2px; line-height: 1.4; }
.timeline-date { font-size: 0.65rem; color: #94a3b8; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }

/* Quote History */
.quote-history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: white; border-radius: 8px;
  border: 1px solid #e2e8f0; margin-bottom: 8px;
}
.qhi-info .qhi-label { font-size: 0.8rem; font-weight: 700; color: #1e293b; }
.qhi-info .qhi-date { font-size: 0.68rem; color: #94a3b8; }
.qhi-total { font-size: 1rem; font-weight: 800; color: var(--green); font-family: 'JetBrains Mono', monospace; }

/* Small action buttons */
.btn-xs {
  padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
  border: none; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-xs-blue { background: #eff6ff; color: #1d4ed8; }
.btn-xs-green { background: #f0fdf4; color: #166534; }
.btn-xs-red { background: #fef2f2; color: #991b1b; }
.btn-xs-gray { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.btn-xs-dark { background: #1e293b; color: white; }
.btn-xs:hover { filter: brightness(0.95); }
