/**
 * Dundee Movers CRM — Pipeline Card & Stage Action Deck Stylesheet.
 * 2-point route timeline, non-overflowing bento specs, and stage action decks.
 */

/* ==========================================================================
   1. Pipeline Card Container
   ========================================================================== */
.pipeline-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: grab;
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.pipeline-card:active { cursor: grabbing; }
.pipeline-card:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: 0 8px 16px -4px rgba(15, 23, 42, 0.08); }
.pipeline-card.card-accepted { border-color: #10b981; background: linear-gradient(to bottom, #f0fdf4 0%, #ffffff 40px); }
.pipeline-card.card-list-mode { cursor: default; }

/* ==========================================================================
   2. Card Header & Customer Identity
   ========================================================================== */
.pcard-header { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.75rem; }
.pcard-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.pcard-drag-indicator {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
  cursor: grab;
  padding-top: 0.1rem;
}
.pcard-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pcard-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
}
.pcard-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.pcard-ref-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-family: monospace;
}
.pcard-movetype-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
}
.pcard-date-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
}
.btn-pcard-survey {
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-pcard-survey:hover { background: #059669; color: #ffffff; border-color: #059669; }

/* Contact Links Strip */
.pcard-contact-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.pcard-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  text-decoration: none;
  padding: 0.22rem 0.55rem;
  border-radius: 0.35rem;
  transition: opacity 0.15s ease;
}
.pcard-contact-link:hover { opacity: 0.85; }
.pcard-contact-link.phone { background: #ecfdf5; color: #065f46; font-weight: 800; border: 1px solid #a7f3d0; }
.pcard-contact-link.email {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pcard-contact-none { font-size: 0.72rem; color: #94a3b8; font-style: italic; }

/* ==========================================================================
   3. Route Itinerary Track (Vertical 2-Stop, Zero Truncation)
   ========================================================================== */
.pcard-route-track {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.route-stop { display: flex; gap: 0.65rem; align-items: flex-start; position: relative; }
.route-marker-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 14px;
  flex-shrink: 0;
  padding-top: 0.25rem;
}
.route-marker-pin { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.route-marker-pin.pin-green { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
.route-marker-pin.pin-red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
.route-marker-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: #cbd5e1;
  margin: 4px 0;
  border-radius: 1px;
}
.route-stop-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.route-stop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.route-stop-badge { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.route-stop-badge.badge-pickup { color: #059669; }
.route-stop-badge.badge-delivery { color: #dc2626; }
.route-stop-chips { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.rchip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  white-space: nowrap;
}
.rchip.stairs-warn { background: #fff1f2; border-color: #fecdd3; color: #be123c; font-weight: 800; }
.rchip.lift-yes { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.route-stop-address {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.35;
}


/* Customer Notes Callout */
.pcard-customer-note {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 0.45rem 0.65rem;
  border-radius: 0.35rem;
  font-size: 0.74rem;
  color: #92400e;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  word-break: break-word;
  min-width: 0;
}
.pcard-customer-note .note-text { font-style: italic; font-weight: 600; line-height: 1.35; }

/* ==========================================================================
   5. Stage Action Decks
   ========================================================================== */
.pcard-action-deck {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
}

/* Stage 1: New Inquiry (Pricing & Pass Dispatch) */
.pdeck-pricing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.pdeck-suggested {
  font-size: 0.72rem;
  color: #0f172a;
  background: #fefce8;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid #fef08a;
  white-space: nowrap;
}
.pdeck-presets { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.btn-preset-chip {
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-preset-chip:hover { background: #059669; color: #ffffff; border-color: #059669; }
.pdeck-input-action-row { display: flex; gap: 0.45rem; align-items: center; }
.pdeck-price-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #059669;
  border-radius: 0.5rem;
  padding: 0 0.4rem;
  height: 38px;
  flex-shrink: 0;
}
.pdeck-price-box .curr-sign { font-size: 0.95rem; font-weight: 900; color: #059669; }
.pdeck-price-box .card-price-input {
  width: 60px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
  padding: 0 0.25rem;
  outline: none;
}
.pdeck-price-box .dep-hint { font-size: 0.64rem; font-weight: 700; color: #64748b; white-space: nowrap; }
.btn-primary-pass {
  flex: 1;
  height: 38px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
  white-space: nowrap;
}
.btn-primary-pass:hover { background: #047857; transform: translateY(-1px); }

/* Stage 2: Move Pass Sent */
.pdeck-quoted-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  gap: 0.4rem;
}
.quoted-badge-label { font-size: 0.66rem; font-weight: 800; color: #92400e; text-transform: uppercase; }
.quoted-badge-val { font-size: 1.05rem; font-weight: 900; color: #0f172a; margin: 0 0.2rem; }
.quoted-badge-dep { font-size: 0.68rem; color: #b45309; }
.btn-confirm-lead {
  padding: 0.3rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn-confirm-lead:hover { background: #059669; }
.pdeck-buttons-row { display: flex; gap: 0.35rem; }
.btn-pdeck-sec {
  flex: 1;
  text-align: center;
  padding: 0.38rem 0.4rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.btn-pdeck-sec:hover { background: #e2e8f0; }
.btn-pdeck-wa {
  flex: 1.2;
  text-align: center;
  padding: 0.38rem 0.4rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #ffffff;
  background: #25D366;
  border: none;
  border-radius: 0.4rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.btn-pdeck-wa:hover { background: #20bd5a; }

/* Stage 3: Confirmed & Booked */
.pdeck-confirmed-banner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
}
.confirmed-shield { font-size: 1.15rem; flex-shrink: 0; }
.confirmed-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.confirmed-title { font-size: 0.76rem; font-weight: 900; color: #065f46; }
.confirmed-price { font-size: 0.72rem; font-weight: 700; color: #047857; }
.btn-goto-dispatch {
  padding: 0.32rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
  background: #0f172a;
  color: #ffffff;
  border-radius: 0.35rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-goto-dispatch:hover { background: #1e293b; }

/* Quick Stage Move Dropdown */
.pdeck-stage-move-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding-top: 0.25rem;
}
.stage-move-label { font-size: 0.66rem; font-weight: 700; color: #94a3b8; }
.pdeck-stage-move-row select {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  padding: 0.2rem 0.4rem;
  outline: none;
  cursor: pointer;
}