/* ════════════════════════════════════════════════════════════
   GHL-STYLE PIPELINE CSS — Desktop Optimised
   Bigger cards, wider columns, better spacing
   ════════════════════════════════════════════════════════════ */

/* ── Pipeline Toolbar ─────────────────────────────────────── */
.ghl-pipeline-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border: 1.5px solid #e4e7eb;
  border-radius: 14px 14px 0 0;
  border-bottom: none;
  font-family: Inter, -apple-system, sans-serif;
}
.ghl-pt-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #101828;
}
.ghl-pt-count { font-weight: 400; color: #607185; font-size: 0.88rem; }
.ghl-pt-views { display: flex; gap: 6px; margin-left: auto; }
.ghl-pt-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1.5px solid #e4e7eb;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ghl-pt-btn:hover { background: #f5f7fa; border-color: #0098ef; color: #0098ef; }
.ghl-pt-btn.active { background: #0098ef; border-color: #0098ef; color: #fff; }
.ghl-pt-btn svg { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.ghl-pt-sort {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid #e4e7eb;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.ghl-pt-sort:focus { border-color: #0098ef; }

/* ── Kanban Board ─────────────────────────────────────────── */
.ghl-kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 24px;
  min-height: calc(100vh - 180px);
  align-items: flex-start;
  background: #f4f6f9;
  box-sizing: border-box;
}
.ghl-kanban-board::-webkit-scrollbar { height: 6px; }
.ghl-kanban-board::-webkit-scrollbar-track { background: transparent; }
.ghl-kanban-board::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 3px; }

/* ── Column ───────────────────────────────────────────────── */
.ghl-kanban-col {
  flex: 0 0 330px;
  width: 330px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  background: transparent;
}

/* ── Column header ────────────────────────────────────────── */
.ghl-kanban-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 14px 18px;
  background: #fff;
  border-radius: 14px 14px 0 0;
  border: 1.5px solid #e4e7eb;
  border-top: 3px solid #e0e0e0;
  border-bottom: none;
  cursor: pointer;
  user-select: none;
  font-family: Inter, -apple-system, sans-serif;
}
.ghl-kanban-col-head:hover { background: #fafbfc; }
.ghl-kch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  flex-shrink: 0;
}
.ghl-kch-name {
  font-size: 15px;
  font-weight: 700;
  color: #101828;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Inter, -apple-system, sans-serif;
}
.ghl-kch-count {
  background: #f0f2f5;
  color: #607185;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
  transition: all 0.2s;
  font-family: Inter, sans-serif;
}
.ghl-kanban-col-head:hover .ghl-kch-count {
  background: #0098ef;
  color: #fff;
}
.ghl-kch-caret {
  color: #9ca3af;
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.ghl-kanban-col.collapsed .ghl-kch-caret { transform: rotate(-90deg); }
.ghl-kanban-col.collapsed .ghl-kanban-col-body { display: none; }

/* ── Column body ──────────────────────────────────────────── */
.ghl-kanban-col-body {
  flex: 1;
  padding: 12px;
  background: #fff;
  border: 1.5px solid #e4e7eb;
  border-top: none;
  border-radius: 0 0 14px 14px;
  overflow-y: auto;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ghl-kanban-col-body::-webkit-scrollbar { width: 5px; }
.ghl-kanban-col-body::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 3px; }
.ghl-kanban-col-body.drag-over {
  background: #f0f7ff;
  border-color: #0098ef;
}

/* ── Empty placeholder ────────────────────────────────────── */
.ghl-col-empty {
  padding: 28px 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.82rem;
  font-style: italic;
}

/* ── Pipeline Card (Product pill style) ──────────────────── */
.lp-card {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid #eaecf0;
  border-top: 4px solid var(--lc, #0098ef);
  border-radius: 12px;
  padding: 14px 14px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  min-height: 68px;
  user-select: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  box-shadow: rgba(16, 24, 40, 0.1) 0px 1px 3px 0px, rgba(16, 24, 40, 0.06) 0px 1px 2px 0px;
}
.lp-card:hover {
  border-color: var(--lc, #0098ef);
  box-shadow: rgba(16, 24, 40, 0.18) 0px 5px 16px 0px;
  transform: translateY(-2px);
}
.lp-card:active { transform: scale(0.99); }
.lp-card.dragging { opacity: 0.6; transform: rotate(1.5deg); }
.lp-card.won { opacity: 1; }
.lp-card.lost { opacity: 0.55; filter: grayscale(20%); }

/* System pill badge */
.lp-system {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f7fa;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  padding: 6px 10px;
  flex-shrink: 0;
  min-width: 124px;
}
.lp-si { font-size: 0.95rem; line-height: 1; }
.lp-sn { font-size: 0.8rem; font-weight: 700; color: #101828; white-space: nowrap; font-family: Inter, sans-serif; }

/* Location */
.lp-loc { flex: 1; padding: 0 12px; min-width: 0; }
.lp-sub {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Inter, -apple-system, sans-serif;
  margin-bottom: 3px;
}
.lp-st {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #607185;
  background: #f0f2f5;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: Inter, sans-serif;
}

/* Stat pills */
.lp-pills { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.lp-pill {
  display: inline-block;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  font-family: Inter, -apple-system, sans-serif;
}
.lp-sqm { background: #f0f2f5; color: #374151; border: 1px solid #e4e7eb; }
.lp-val { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.lp-val.lp-won { background: #16a34a; color: #fff; border-color: #16a34a; }
.lp-done { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.lp-done.lp-won { background: #16a34a; color: #fff; border-color: #16a34a; }
.lp-pend { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Action area */
.lp-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding-left: 10px; }
.lp-go {
  background: #0098ef;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}
.lp-go:hover { background: #007bb8; }
.lp-drag-handle {
  color: #d0d5dd;
  font-size: 0.9rem;
  cursor: grab;
  padding: 6px;
  transition: color 0.15s;
}
.lp-drag-handle:hover { color: #888; }
.lp-card:active .lp-drag-handle { cursor: grabbing; }

/* ── Pipeline filter buttons ──────────────────────────────── */
.pipeline-btn.ghl-style {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  border-color: #6d28d9 !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.3);
  font-size: 0.9rem !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
}
.pipeline-btn.ghl-style:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6) !important;
  box-shadow: 0 5px 16px rgba(109, 40, 217, 0.4);
}
.pipeline-btn.ghl-style svg { fill: #fff !important; }

/* ── Stage move modal ─────────────────────────────────────── */
.ghl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ghl-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}
.ghl-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e4e7eb;
}
.ghl-modal-title { font-size: 1.05rem; font-weight: 900; color: #111; font-family: Inter, sans-serif; }
.ghl-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f5f7fa;
  color: #666;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.15s;
}
.ghl-modal-close:hover { background: #fee2e2; color: #dc2626; }
.ghl-modal-body { padding: 24px; }
.ghl-modal-lead-name { font-size: 1.1rem; font-weight: 800; color: #111; margin-bottom: 4px; font-family: Inter, sans-serif; }
.ghl-modal-lead-sub { font-size: 0.88rem; color: #888; margin-bottom: 22px; }
.ghl-modal-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9ca3af;
  margin-bottom: 12px;
  font-family: Inter, sans-serif;
}
.ghl-stage-move-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.ghl-stage-move-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #e4e7eb;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  text-align: left;
}
.ghl-stage-move-btn:hover { border-color: var(--s-color); background: var(--s-bg); }
.ghl-stage-move-btn.current { border-color: var(--s-color); background: var(--s-bg); }
.ghl-sm-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--s-color); flex-shrink: 0; }
.ghl-sm-label { font-size: 0.9rem; font-weight: 700; color: #111; font-family: Inter, sans-serif; }
.ghl-sm-count { font-size: 0.75rem; color: #888; }
.ghl-stage-move-btn.current .ghl-sm-label { color: var(--s-color); }
.ghl-action-row { display: flex; gap: 10px; margin-top: 18px; }
.ghl-action-row button {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ghl-modal-cancel { background: #f5f7fa; color: #374151; border: 1.5px solid #e4e7eb !important; }
.ghl-modal-cancel:hover { background: #e4e7eb; }
.ghl-modal-primary { background: #0098ef; color: #fff; }
.ghl-modal-primary:hover { background: #007bb8; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .ghl-kanban-col { flex: 0 0 280px; width: 280px; }
  .ghl-pipeline-toolbar { padding: 12px 16px; gap: 10px; }
  .ghl-kanban-board { padding: 16px; }
  .ghl-stage-move-grid { grid-template-columns: 1fr; }
  .ghl-pt-btn { padding: 7px 14px; font-size: 0.82rem; }
  .lp-system { min-width: 110px; }
}

/* ── Drag ghost ───────────────────────────────────────────── */
.ghl-deal-card[aria-grabbed=true] { background: #f0f7ff; border-color: #0098ef; }