/**
 * Dundee Movers CRM — Pipeline & Kanban Board Layout Stylesheet.
 * 3-stage dispatch board, hero metrics, columns, and drag & drop dropzones.
 */

/* ==========================================================================
   1. Pipeline View Container & Hero Stats
   ========================================================================== */
.pipeline-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 0 2.5rem 0;
}

.pipeline-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pstat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.pstat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 1.4rem;
}

.pstat-card.new .pstat-icon { background: #eff6ff; }
.pstat-card.quoted .pstat-icon { background: #fffbeb; }
.pstat-card.confirmed .pstat-icon { background: #ecfdf5; }

.pstat-meta {
  display: flex;
  flex-direction: column;
}

.pstat-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.pstat-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
}

.pstat-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   2. Pipeline Toolbar & View Switcher
   ========================================================================== */
.pipeline-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #ffffff;
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
}

.pipeline-search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.pipeline-search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  outline: none;
  transition: all 0.2s ease;
}

.pipeline-search-box input:focus {
  border-color: #059669;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.search-lens-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.pipeline-view-modes {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 0.625rem;
  gap: 0.25rem;
}

.btn-view-mode {
  padding: 0.5rem 0.875rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-view-mode.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   3. Kanban Board Grid & Columns
   ========================================================================== */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(360px, 1fr));
  gap: 1.25rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 1.5rem;
}

.pipeline-column {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pipeline-column.col-new { border-top: 4px solid #3b82f6; }
.pipeline-column.col-quoted { border-top: 4px solid #f59e0b; }
.pipeline-column.col-confirmed { border-top: 4px solid #10b981; }

.pipeline-column.column-drag-over {
  background: #eff6ff;
  border-style: dashed;
  border-color: #3b82f6;
}

.column-header {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.col-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.col-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.col-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.col-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.col-counter-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 900;
  border-radius: 9999px;
}

.col-new .col-counter-badge { background: #dbeafe; color: #1e40af; }
.col-quoted .col-counter-badge { background: #fef3c7; color: #92400e; }
.col-confirmed .col-counter-badge { background: #d1fae5; color: #065f46; }

.column-cards-container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.empty-col-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  color: #94a3b8;
  gap: 0.5rem;
  margin: auto 0;
}

.empty-col-dropzone .empty-icon { font-size: 2rem; }
.empty-col-dropzone .empty-text { font-size: 0.85rem; font-weight: 700; color: #64748b; }

.pipeline-list-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
