/* Agency CRM: pipeline (wireframe 09), lead detail (10), quotes, reports. */

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #e9eef2; border-radius: 18px; padding: 12px; min-height: 220px; display: flex; flex-direction: column; gap: 10px; border: 2px dashed transparent; }
.kcol.over { border-color: var(--teal); background: #dcefee; }
.kcol-head { display: flex; gap: 8px; align-items: center; padding: 2px 4px 4px; }
.kcol-head .count { background: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 9px; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 6px; color: var(--ink); cursor: grab; text-decoration: none; }
.lead-card:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.lc-top { display: flex; align-items: center; gap: 8px; }
.lc-bottom { display: flex; justify-content: space-between; align-items: center; }
.lc-flag { display: inline-block; background: #fde8e8; color: #9b1c1c; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; width: fit-content; }
.lc-flag.bad { background: #9b1c1c; color: #fff; }
.src { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #eef2f6; color: #475569; }
.s-marketplace { background: #fff1e5; color: #b45309; }
.s-referral { background: #e8efff; color: #3730a3; }
.s-manual { background: #eef2f6; color: #475569; }
.pipeline-foot { margin-top: 16px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.pipeline-foot .right { margin-left: auto; }
.mini-avatar { flex: none; }

.detail-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.contact-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.contact-head .stage-pick { margin-left: auto; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.contact-head select, .head-actions select { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font: 600 14px Inter, sans-serif; background: #fff; }
.avatar.big { flex: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: flex; gap: 12px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-top: 6px; flex: none; }
.tl-enquiry .tl-dot { background: #f97316; }
.tl-reply .tl-dot, .tl-quote .tl-dot { background: var(--teal); }
.tl-stagechange .tl-dot { background: var(--navy); }
.tl-refund .tl-dot { background: #b42318; }
.tl-body { color: #334155; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.task-line { align-items: flex-start; }
.task-line.done span { text-decoration: line-through; color: var(--muted); }
.quote-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.quote-line:last-of-type { border-bottom: 0; }
a.quote-line:hover { text-decoration: none; background: var(--bg); }
.quote-builder { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.line-edit { display: grid; grid-template-columns: 1fr 70px 110px 24px; gap: 6px; align-items: center; }
.line-edit input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font: 400 14px Inter, sans-serif; width: 100%; }
.quote-total { text-align: right; font-size: 15px; }

.quote-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; max-width: min(460px, 90%); display: grid; gap: 6px; }
.qc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qc-total { font: 700 22px "DM Sans", sans-serif; }
.qc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stat.alert b { color: #b42318; }
.crumbs { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.done-row td { opacity: .55; }

@media print { .no-print { display: none !important; } }
@media (max-width: 1100px) { .detail-cols { grid-template-columns: 1fr; } }
