/* ---- PIPELINE BOARD ---- */
.pipeline-app {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', -apple-system, sans-serif;
}

/* ---- TOPBAR ---- */
.pipeline-topbar {
  background: var(--bg-raised);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.topbar-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

.topbar-back {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.topbar-back:hover { color: var(--accent); }

.btn-add {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-add:hover { opacity: 0.88; }

/* ---- BOARD LAYOUT ---- */
.pipeline-board-wrap {
  padding: 28px;
  overflow-x: auto;
  min-height: calc(100vh - 60px);
}

.pipeline-board {
  display: flex;
  gap: 16px;
  min-width: max-content;
  align-items: flex-start;
}

/* ---- COLUMN ---- */
.pipeline-col {
  width: 260px;
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.pipeline-col.drag-over {
  border-color: rgba(79,209,197,0.4);
  background: rgba(79,209,197,0.04);
}

.col-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.col-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.col-count {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  background: rgba(79,209,197,0.12);
  color: var(--accent);
  border-radius: 20px;
  padding: 2px 9px;
  min-width: 24px;
  text-align: center;
}

/* Stage-specific accent colors */
.pipeline-col[data-stage="lead"] .col-title { color: #8b95ad; }
.pipeline-col[data-stage="demo_scheduled"] .col-title { color: #4fd1c5; }
.pipeline-col[data-stage="pilot_active"] .col-title { color: #a78bfa; }
.pipeline-col[data-stage="expanding"] .col-title { color: #f472b6; }
.pipeline-col[data-stage="enterprise_contract"] .col-title { color: #facc15; }

.pipeline-col[data-stage="demo_scheduled"] .col-count { background: rgba(79,209,197,0.12); color: #4fd1c5; }
.pipeline-col[data-stage="pilot_active"] .col-count { background: rgba(167,139,250,0.12); color: #a78bfa; }
.pipeline-col[data-stage="expanding"] .col-count { background: rgba(244,114,182,0.12); color: #f472b6; }
.pipeline-col[data-stage="enterprise_contract"] .col-count { background: rgba(250,204,21,0.12); color: #facc15; }

.col-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 80px;
}

/* ---- CARD ---- */
.pipeline-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: grab;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
}

.pipeline-card:hover {
  border-color: rgba(79,209,197,0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pipeline-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.pipeline-card.drag-placeholder {
  border: 2px dashed rgba(79,209,197,0.3);
  background: rgba(79,209,197,0.04);
  min-height: 60px;
}

.card-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-contact {
  font-size: 0.8rem;
  color: var(--fg-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.card-contact-name { font-weight: 500; }

.card-contact-email {
  color: var(--fg-dim);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.card-days {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-family: 'Outfit', sans-serif;
}

.card-days.stale { color: #f472b6; }
.card-days.warning { color: #facc15; }

.card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.pipeline-card:hover .card-actions { opacity: 1; }

.btn-icon {
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}

.btn-icon:hover { background: rgba(79,209,197,0.15); color: var(--accent); }
.btn-icon.delete:hover { background: rgba(244,114,182,0.15); color: #f472b6; }

.card-notes {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-top: 6px;
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---- EMPTY STATE ---- */
.col-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.82rem;
  font-style: italic;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,12,22,0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.modal h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 6px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(79,209,197,0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--fg);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-cancel:hover { border-color: rgba(255,255,255,0.2); color: var(--fg); }

.btn-save {
  background: var(--gradient);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-save:hover { opacity: 0.88; }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-card-highlight);
  border: 1px solid rgba(79,209,197,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--fg);
  font-size: 0.88rem;
  z-index: 300;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  transform: translateY(0);
}

.toast.hidden {
  opacity: 0;
  transform: translateY(12px);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .pipeline-board-wrap { padding: 16px; }
  .pipeline-topbar { padding: 0 16px; }
  .modal { padding: 24px 20px; }
}
