/* ════════════════════════════════════════════════════════════
   JOB MODE — Quote Negotiation (M8-M15)
   ════════════════════════════════════════════════════════════ */

/* ── Job Header ─────────────────────────────── */
.job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.job-header.hidden { display: none; }
.job-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--chip-bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.job-milestone-badge.active { background: var(--gold-light); border-color: var(--gold); color: var(--primary); }
.job-role-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
}
.job-role-badge.client { background: #e3f2fd; color: #1565c0; }
.job-role-badge.provider { background: var(--success-light); color: var(--success-dark); }
.job-phase-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Job Messages ──────────────────────────── */
.msg.msg-own {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.msg-other {
  align-self: flex-start;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg.msg-system {
  align-self: center;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  max-width: 90%;
}
.msg-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: capitalize;
}
.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.msg-moderated-note {
  font-size: 11px;
  color: var(--warning, #e6a817);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.msg-moderated-toggle {
  font-size: 11px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.msg-moderated-toggle:hover { opacity: 0.8; }

/* Conversation transition divider (C.1) */
.conversation-transition-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  padding: 0 16px;
}
.conversation-transition-divider::before,
.conversation-transition-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.conversation-transition-divider .ctd-pill {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg, var(--success-light));
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* Dim prior intake messages after provider acceptance */
.intake-history { opacity: 0.85; }

/* Provider Contact Bar (C.2) */
.provider-contact-bars { display: flex; flex-direction: column; gap: 0; }
.provider-contact-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.provider-contact-bar:hover { background: var(--hover-bg, #f5f3ef); }
.pcb-active { background: var(--card-bg); border-left: 3px solid var(--success); }
.pcb-inactive { opacity: 0.7; }
.pcb-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}
.pcb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.pcb-info { flex: 1; min-width: 0; }
.pcb-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pcb-detail { font-size: 12px; color: var(--text-muted); }
.pcb-contact { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; margin-top: 2px; }
.pcb-scroll-btn {
  font-size: 12px; color: var(--primary); background: none; border: none;
  cursor: pointer; white-space: nowrap; padding: 4px 8px;
}

/* Quote event message */
.msg-quote-event {
  background: var(--gold-light) !important;
  border: 1px solid var(--gold) !important;
  color: var(--primary) !important;
}
.quote-event-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quote-event-icon { font-size: 20px; }
.quote-event-info { font-size: 13px; font-weight: 600; }
.quote-event-amount { font-size: 15px; font-weight: 700; color: var(--primary); }

/* Change request message */
.msg-change-request {
  background: var(--warning-light) !important;
  border: 1px solid #ffcc80 !important;
}
.change-request-card { font-size: 13px; }
.change-request-card .cr-title { font-weight: 600; margin-bottom: 6px; color: var(--primary); }
.change-request-card .cr-item {
  padding: 3px 0;
  color: var(--text-light);
}
.change-request-card .cr-item::before {
  content: '\2022';
  margin-right: 6px;
  color: var(--text-muted);
}

/* Payment event message */
.msg-payment {
  background: var(--success-light) !important;
  border: 1px solid #a5d6a7 !important;
}

/* Moderated message note — see primary definition at line 82 */

/* Interpreted actions card */
.msg-interpreted-actions { margin-top: 8px; }
.interpreted-actions-card {
  font-size: 12px;
  background: #f0f4ff;
  border: 1px solid #c5cfe0;
  border-radius: 8px;
  padding: 8px 12px;
}
.ia-title { font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.ia-item { padding: 2px 0; color: var(--text-light); }
.ia-action { font-weight: 600; }
.ia-summary {
  margin-top: 4px;
  font-style: italic;
  color: var(--text-muted);
  font-size: 11px;
}

/* Settlement summary */
.settlement-summary {
  padding: 12px 16px;
  background: #f0f4ff;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.settlement-changes {
  margin-bottom: 12px;
  font-size: 12px;
}
.settlement-changes-title, .settlement-inclusions-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.settlement-change-item {
  padding: 2px 0;
  color: var(--text-light);
}
.settlement-inclusions { margin-bottom: 12px; font-size: 12px; }
.settlement-inclusion-item {
  padding: 2px 0;
  color: var(--text-light);
}
.settlement-inclusion-item::before {
  content: '\2713';
  margin-right: 6px;
  color: #4caf50;
}

/* Cancel button */
.cancel-job-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.qb-btn-danger {
  background: #fff;
  color: #d32f2f;
  border: 1px solid #d32f2f;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.qb-btn-danger:hover { background: #ffebee; }

/* ── Action Panel ──────────────────────────── */
.job-action-panel {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  max-height: 55vh;
  overflow-y: auto;
}
.job-action-panel.hidden { display: none; }
.action-panel-header {
  padding: 12px 20px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.action-panel-body {
  padding: 0 20px 16px;
}

/* ── Quote Table ───────────────────────────── */
.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.quote-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.quote-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.quote-table tr:last-child td { border-bottom: none; }
.quote-table .col-actions { width: 70px; text-align: right; }
.quote-table .col-qty { width: 50px; text-align: center; }
.quote-table .col-price { width: 90px; text-align: right; }
.quote-table .col-total { width: 90px; text-align: right; font-weight: 600; }

/* Discount display */
.price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 12px;
  margin-right: 4px;
}
.price-discounted { color: var(--success); font-weight: 600; }
.discount-badge {
  display: inline-block;
  background: var(--success-light);
  color: var(--success);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}
.line-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* Quote totals */
.quote-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 10px;
  border-top: 2px solid var(--border);
}
.quote-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
}
.quote-total-row.total {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 4px;
}
.quote-total-row.deposit {
  color: var(--gold);
  font-weight: 600;
}

/* Quote expiry countdown */
.quote-expiry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.quote-expiry.urgent { color: var(--danger); font-weight: 600; }
.quote-version-badge {
  font-size: 11px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}
.quote-note {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--suggestion-bg);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}

/* ── Quote Builder (Provider editable) ─────── */
.quote-builder { margin-top: 8px; }
.quote-builder-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.qb-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.qb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.qb-btn-primary { background: var(--primary); color: #fff; }
.qb-btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.qb-btn-secondary { background: var(--chip-bg); color: var(--text); border: 1px solid var(--border); }
.qb-btn-secondary:hover:not(:disabled) { background: var(--border); }
.qb-btn-danger { background: #ffebee; color: var(--danger); }
.qb-btn-danger:hover:not(:disabled) { background: #ffcdd2; }
.qb-btn-success { background: var(--success); color: #fff; }
.qb-btn-success:hover:not(:disabled) { background: #4a7a4a; }

/* Inline edit */
.inline-edit-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.inline-edit-input:focus { box-shadow: 0 0 0 2px rgba(45,45,45,0.15); }
.edit-row-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 14px;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.edit-row-btn:hover { opacity: 1; }

/* ── Client Quick Actions ──────────────────── */
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.quick-action-btn {
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.quick-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--chip-bg);
}

/* ── Settlement Review ─────────────────────── */
.settlement-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.settlement-party {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
}
.settlement-party .check { color: var(--success); font-weight: 700; }
.settlement-party .pending { color: var(--text-muted); }

/* ── Scheduling Form ───────────────────────── */
.schedule-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.schedule-form .full-width { grid-column: 1 / -1; }
.schedule-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.schedule-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}
.schedule-field input:focus { border-color: var(--primary); }

/* ── Booking Confirmed (M15) ───────────────── */
.booking-confirmed {
  text-align: center;
  padding: 24px 16px;
}
.booking-confirmed .bc-icon { font-size: 48px; margin-bottom: 12px; }
.booking-confirmed .bc-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.booking-confirmed .bc-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}
.booking-summary {
  text-align: left;
  background: var(--chip-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}
.booking-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.booking-summary-row:last-child { border-bottom: none; }
.booking-summary-row .bs-label { color: var(--text-muted); }
.booking-summary-row .bs-value { font-weight: 600; color: var(--primary); }

/* ── Payment Section (M12A) ────────────────── */
.payment-section { margin-top: 8px; }
.payment-amount-box {
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.payment-amount-label { font-size: 12px; color: var(--text-muted); }
.payment-amount-value { font-size: 24px; font-weight: 700; color: var(--primary); }
#stripe-card-element {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.payment-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* ── Discount Modal ────────────────────────── */
/* ── Auth Upgrade Gate (B1) ───────────────────── */
.auth-upgrade-gate { margin-top: 16px; text-align: center; }
.auth-gate-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.auth-gate-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 12px; }
.auth-degraded-banner { background: var(--warning-bg, #fff3cd); color: var(--warning-text, #856404); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px; text-align: center; font-size: 0.875rem; }
.auth-degraded-banner a { color: inherit; text-decoration: underline; }

.discount-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.discount-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.discount-modal h3 {
  font-size: 16px;
  margin-bottom: 16px;
}
.discount-modal .dm-field {
  margin-bottom: 12px;
}
.discount-modal .dm-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.discount-modal .dm-field select,
.discount-modal .dm-field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.discount-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ── Toast ──────────────────────────────────── */
.job-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  z-index: 1001;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
.job-toast.error { background: var(--danger); }
.job-toast.success { background: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

/* ── Split Screen Demo Layout ──────────────── */
.layout.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.layout.split-screen .chat-area {
  border-right: 2px solid var(--border);
}

.provider-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8f6f2;
}
.provider-panel .pp-header {
  background: var(--success);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.provider-panel .pp-header .pp-badge {
  background: var(--gold);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}
.provider-panel .pp-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Provider panel — lead notification card (3-zone layout) */
.pp-lead-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
}
.pp-lead-header {
  background: var(--success);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pp-lead-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.pp-lead-timer {
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.pp-lead-timer.urgent { background: rgba(255,80,80,0.3); }

/* Zone 1: Identity (fixed top) */
.pp-lead-identity { flex-shrink: 0; }
.pp-lead-identity .pp-key-facts {
  padding: 0 18px 14px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pp-lead-identity .pp-key-facts .pp-fact-sep {
  color: var(--border);
  font-size: 10px;
}
.pp-lead-identity .pp-profession-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Zone 2: Details (scrollable middle) */
.pp-lead-details {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 18px;
}

/* Zone 3: Actions (fixed bottom) */
.pp-lead-actions-zone {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.pp-lead-actions-zone .pp-estimate-bar { margin: 14px 18px 0; }
.pp-lead-actions-zone .pp-fee-callout { margin: 10px 18px 0; }

/* Timeline badge */
.pp-timeline-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.pp-timeline-badge.normal { background: var(--success-light); color: var(--success-dark); }
.pp-timeline-badge.near { background: var(--warning-light); color: var(--warning); }
.pp-timeline-badge.soon { background: var(--warning-light); color: var(--warning); }
.pp-timeline-badge.urgent { background: #ffebee; color: var(--danger-dark); }

/* Map link */
.pp-map-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  margin-left: 4px;
  white-space: nowrap;
}
.pp-map-link:hover { text-decoration: underline; }

/* Transparency callout */
.pp-transparency-box {
  background: #f0f4f8;
  border: 1px solid #d0d9e4;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.pp-transparency-box .pp-section-label { margin-bottom: 6px; }
.pp-transparency-box p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Reference photo grid */
.pp-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.pp-reference-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}
.pp-reference-thumb:hover { opacity: 0.85; }

/* Bundle context */
.pp-bundle-context {
  background: #f5f0eb;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.pp-bundle-context strong { color: var(--text); }

.pp-timer-section {
  padding: 0 18px;
  margin-top: 8px;
}
.pp-timer-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.pp-timer-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 30s linear, background-color 1s ease;
}
.pp-timer-bar-fill.green { background: var(--success); }
.pp-timer-bar-fill.amber { background: #f0a830; }
.pp-timer-bar-fill.orange { background: #e67e22; }
.pp-timer-bar-fill.red { background: #e74c3c; }
.pp-timer-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 3px;
}
.pp-date-headline {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.pp-location-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pp-lead-body {
  padding: 18px;
}
.pp-lead-greeting {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}
.pp-lead-greeting strong { font-weight: 700; }
.pp-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pp-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #f8f6f2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.pp-detail-cell {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.pp-detail-cell:nth-child(odd) { border-right: 1px solid rgba(0,0,0,0.06); }
.pp-detail-cell.full-width { grid-column: 1 / -1; border-right: none; }
.pp-detail-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.pp-detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.pp-services-list {
  margin-bottom: 14px;
}
.pp-service-tag {
  display: inline-block;
  background: #f0ede8;
  color: var(--text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  margin: 0 4px 6px 0;
}
.pp-context-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pp-context-row span.icon { font-size: 14px; flex-shrink: 0; }
.pp-estimate-bar {
  background: linear-gradient(135deg, #f5f2ed, #ebe7df);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pp-estimate-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-estimate-value { font-size: 16px; font-weight: 700; color: var(--text); }
.pp-match-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f7f0;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 12px;
  color: #2d6a2e;
}
.pp-match-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.pp-match-reasons {
  margin-bottom: 14px;
}
.pp-match-reason-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #2d6a2e;
  margin-bottom: 5px;
  line-height: 1.4;
}
.pp-match-reason-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  margin-top: 5px;
}
.pp-competition {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 0;
  margin-bottom: 4px;
}
.pp-fee-callout {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pp-fee-left { display: flex; flex-direction: column; }
.pp-fee-amount { font-size: 16px; font-weight: 700; color: var(--text); }
.pp-fee-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pp-fee-refund { font-size: 11px; color: #7b6e29; font-weight: 500; }
.pp-lead-actions {
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
}
.pp-btn-accept {
  flex: 2;
  background: var(--success);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pp-btn-accept:hover { filter: brightness(1.1); }
.pp-btn-accept:disabled { opacity: 0.5; cursor: not-allowed; }
.pp-btn-decline {
  flex: 1;
  background: #e8e4de;
  color: var(--text);
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.pp-btn-decline:hover { background: #d4cfc4; }

/* Provider panel — chat view */
.pp-chat-area {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pp-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.pp-msg.from-provider {
  align-self: flex-end;
  background: var(--success);
  color: #fff;
}
.pp-msg.from-client {
  align-self: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.pp-msg.from-system {
  align-self: center;
  background: var(--chip-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}
.pp-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.pp-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.pp-input-bar button {
  background: var(--success);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Outreach status card enhancements */
.outreach-provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0ece4;
}
.outreach-provider-row:last-child { border-bottom: none; }
.outreach-provider-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
}
.outreach-provider-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.outreach-provider-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.outreach-provider-status {
  font-size: 12px;
  color: var(--text-muted);
}
.outreach-provider-row.status-accepted .outreach-provider-status {
  color: var(--success);
  font-weight: 600;
}
.outreach-provider-row.status-declined .outreach-provider-status {
  color: var(--danger);
}
.outreach-provider-timer {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  margin-left: 6px;
}

/* Countdown timer */
.outreach-timer {
  margin-top: 12px;
  padding: 12px;
  background: #f8f6f2;
  border-radius: var(--radius-sm);
  text-align: center;
}
.timer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.timer-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.timer-bar {
  height: 4px;
  background: #e8e4de;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.timer-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 1s linear;
}
.timer-expired { font-size: 13px; color: var(--danger); font-weight: 600; }
.timer-done { font-size: 13px; color: var(--success); font-weight: 600; }

/* Outreach waiting tips */
.outreach-tips {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--suggestion-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.outreach-tips-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.outreach-tip-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  transition: opacity 0.3s ease-in-out;
}

/* ── Provider panel responsive ──────────────────────────── */
@media (max-width: 480px) {
  .pp-detail-grid { grid-template-columns: 1fr; }
  .pp-lead-actions { flex-direction: column; }
  .pp-btn-accept, .pp-btn-decline { flex: none; width: 100%; }
  .pp-reference-grid { grid-template-columns: repeat(2, 1fr); }
  .pp-fee-callout { flex-direction: column; gap: 8px; }
  .pp-estimate-bar { flex-direction: column; gap: 6px; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════
   PROVIDER CARD v2 — Hero-first layout
   ═══════════════════════════════════════════════════════════ */
.card-hero {
  width: 100%; height: 140px; border-radius: var(--radius) var(--radius) 0 0;
  background-size: cover; background-position: center;
  position: relative;
}
.card-hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, rgba(0,0,0,0.35));
  border-radius: 0 0 0 0;
}
.card-hero-score {
  position: absolute; top: 10px; right: 10px;
  background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.card-savings-banner {
  position: absolute; bottom: 10px; left: 10px;
  background: var(--success-dark); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.card-savings-banner.muted {
  background: var(--gold);
}
.card-hero-fallback {
  width: 100%; height: 140px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(135deg, var(--gold-light), var(--bg-muted, #f5f3ee));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.card-identity {
  display: flex; gap: 12px; padding: 12px 16px 8px; align-items: flex-start;
}
.card-identity-info { flex: 1; min-width: 0; }
.card-price-block { text-align: right; flex-shrink: 0; }
.card-price-range { font-size: 14px; font-weight: 700; color: var(--primary); }
.card-budget-fit { font-size: 11px; color: var(--success-dark); margin-top: 2px; }
.card-budget-fit.above { color: var(--text-muted); }
.card-review-block {
  padding: 8px 16px; border-top: 1px solid var(--border-light, #eee);
  font-size: 13px; font-style: italic; color: var(--text-secondary, #555);
  line-height: 1.4;
}
.card-review-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-review-author {
  font-style: normal; font-weight: 600; font-size: 11px;
  color: var(--text-muted); margin-top: 4px;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 12px;
}
.card-view-link {
  font-size: 13px; color: var(--accent); font-weight: 600;
  cursor: pointer; border: none; background: none; padding: 0;
}
.card-view-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   COLLAPSIBLE SECTIONS
   ═══════════════════════════════════════════════════════════ */
.collapsible-section { padding: 0; }
.collapsible-header {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 12px 14px; user-select: none;
  border-bottom: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.collapsible-header:hover { background: var(--bg-muted); }
.collapsible-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-light); flex: 1;
}
/* CSS triangle instead of Unicode ▸ */
.collapsible-chevron {
  display: inline-block; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 7px solid var(--text-light);
  transition: transform 0.25s ease;
}
.collapsible-chevron.open { transform: rotate(90deg); }
.collapsible-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; }
/* CSS Grid 0fr → 1fr for smooth height animation */
.collapsible-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
  opacity: 0;
}
.collapsible-body.open { grid-template-rows: 1fr; opacity: 1; }
.collapsible-inner { min-height: 0; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   PROFILE MODAL v2 — Sticky header/footer, sections
   ═══════════════════════════════════════════════════════════ */
.profile-sticky-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.profile-sticky-header .sh-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0;
}
.profile-sticky-header .sh-name {
  font-size: 16px; font-weight: 700; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-sticky-header .sh-rating { font-size: 12px; color: var(--gold); white-space: nowrap; }
.profile-sticky-header .sh-price { font-size: 14px; font-weight: 700; white-space: nowrap; }
.profile-sticky-header .sh-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--bg-muted, #f5f3ee); cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-sticky-header .sh-close:hover { background: var(--border); }
.profile-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); opacity: 0.6;
  padding: 12px 20px 6px; border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}
.profile-sticky-footer {
  position: sticky; bottom: 0; z-index: 10;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 20px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 12px; justify-content: space-between;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
@media (max-width: 480px) {
  .profile-sticky-footer {
    flex-direction: column;
  }
  .profile-sticky-footer button { width: 100%; }
  .profile-sticky-footer .btn-book-now { order: -1; }
}

/* Trust stats bar — CSS Grid for even columns */
.trust-stats-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0; background: var(--bg-muted); border-radius: var(--radius-sm);
  padding: 12px; margin: 0 20px 16px;
}
.trust-stat {
  text-align: center; padding: 4px 8px;
  border-right: 1px solid var(--border-light); overflow: hidden;
}
.trust-stat:last-child { border-right: none; }
.trust-stat-value {
  font-size: 16px; font-weight: 700; color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trust-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

@media (max-width: 480px) {
  .trust-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .trust-stat { border-right: none; border-bottom: 1px solid var(--border-light); padding: 8px; }
  .trust-stat:nth-last-child(-n+2) { border-bottom: none; }
}

/* Estimate savings block */
.estimate-savings-block {
  background: var(--success-light); border-left: 3px solid var(--success-dark);
  padding: 10px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 10px;
}
.estimate-savings-headline { font-size: 14px; font-weight: 700; color: var(--success-dark); margin-bottom: 4px; }
.estimate-savings-detail { font-size: 12px; color: var(--success-dark); }
.est-discount-active { white-space: nowrap; }
.estimate-also-available { font-size: 11px; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* Package savings (elevated) */
.package-savings-badge {
  background: var(--success-light); color: var(--success-dark); font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   QUOTE v2 — Summary-first with collapsible items
   ═══════════════════════════════════════════════════════════ */
.quote-summary-card {
  background: var(--bg-muted, #f5f3ee); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 12px; text-align: center;
}
.quote-total-hero { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.quote-summary-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.quote-summary-savings { font-size: 13px; font-weight: 600; color: var(--success-dark); margin: 8px 0; }
.quote-summary-expiry {
  font-size: 12px; padding: 4px 10px;
  border-radius: var(--radius-pill); display: inline-block; margin-top: 4px;
}
.quote-summary-expiry.safe { background: var(--success-light); color: var(--success-dark); }
.quote-summary-expiry.warning { background: var(--warning-light); color: var(--warning); }
.quote-summary-expiry.urgent { background: var(--danger-light); color: var(--danger-dark); }
.quote-table tr.discounted td:first-child { border-left: 3px solid var(--success-dark); padding-left: 9px; }
