/* module: crm — filter chips, pipeline board, activity, follow-ups, venue crew notes. Rules: docs/BRAND.md */
.crm-ico { flex-shrink: 0; vertical-align: -3px; }
.crm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.crm-cap::first-letter { text-transform: uppercase; }

/* Filter chips (segmented) */
.chips { display: inline-flex; gap: 2px; background: var(--paper); border: 1px solid var(--rule); padding: 2px; border-radius: var(--r-ctl); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 4px; font: inherit; font-size: 13px; font-weight: 600; color: var(--steel); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--graphite); }
.chip.active { background: var(--graphite); color: #fff; }

.crm-crumbs { font-size: 13px; margin-bottom: 6px; color: var(--steel); }
.crm-crumbs a { color: var(--steel); }
.crm-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-contactline { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.crm-contactline a { color: var(--teal); }
.crm-sub { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; }
.crm-owed { color: var(--bad); }
.crm-notes { white-space: pre-wrap; line-height: 1.5; }
.crm-clip { display: inline-block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.crm-section-title { margin: 20px 0 8px; display: flex; align-items: center; gap: 6px; }
.crm-none { padding: 4px 2px 8px; }
.crm-ident { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crm-ident .tape { min-width: 84px; }
.crm-row-acts { justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }

/* Contact cards (overview) */
.crm-contact-cards { display: flex; flex-direction: column; gap: 14px; }
.crm-contact-card { display: flex; gap: 12px; align-items: flex-start; }
.crm-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--concrete); color: var(--graphite); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; text-transform: uppercase; font-family: var(--font-display); }
.crm-contact-links { margin-top: 3px; font-size: 13px; }
.crm-mini { list-style: none; margin: 0; padding: 0; }
.crm-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.crm-mini li:last-child { border-bottom: 0; }
.crm-mini-ico { display: inline-flex; gap: 8px; align-items: center; }
.crm-mini-ico .crm-ico { color: var(--steel); }

/* Activity add form */
.crm-act-form { margin-bottom: 8px; }
.crm-act-form .card-body { padding-top: 14px; }
.crm-act-types { display: flex; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--rule); padding: 2px; border-radius: var(--r-ctl); width: max-content; max-width: 100%; }
.crm-act-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.crm-act-grid textarea, .crm-act-grid .row { grid-column: 1 / -1; }
@media (max-width: 700px) { .crm-act-grid { grid-template-columns: 1fr; } }

/* Follow-up rows */
.crm-tasklist { overflow: hidden; }
.crm-task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); transition: opacity .25s; }
.crm-task:last-child { border-bottom: 0; }
.crm-task:hover { background: #FAFBFC; }
.crm-task.done { opacity: .5; }
.crm-task.done .crm-task-subject { text-decoration: line-through; }
.crm-check input { width: 20px; height: 20px; margin-top: 0; cursor: pointer; accent-color: var(--teal); }
.crm-task-main { flex: 1; min-width: 0; }
.crm-task-subject { font-weight: 600; }
.crm-task-body { font-size: 13px; margin-top: 2px; white-space: pre-wrap; }
.crm-task-meta { font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.crm-task-meta .tape { font-size: 13px; }
.crm-due { font-size: 13px; color: var(--steel); white-space: nowrap; }
.crm-due.overdue { color: var(--bad); font-weight: 600; }
.crm-due.today { color: var(--warn); font-weight: 600; }
.crm-task .icon-btn { line-height: 0; padding: 6px; }
.crm-group-overdue .crm-tasklist { box-shadow: inset 3px 0 0 var(--bad); }
.crm-group-today .crm-tasklist { box-shadow: inset 3px 0 0 var(--gaffer); }

/* Activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 12px; }
.tl-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); border: 1px solid var(--rule); display: grid; place-items: center; flex-shrink: 0; z-index: 1; color: var(--steel); }
.tl-content { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 10px 14px; }
.tl-head { display: flex; align-items: center; gap: 10px; }
.tl-head .icon-btn { line-height: 0; padding: 6px; opacity: .4; }
.tl-item:hover .tl-head .icon-btn, .tl-head .icon-btn:focus-visible { opacity: 1; }
.tl-done { font-size: 13px; color: var(--steel); display: inline-flex; gap: 4px; align-items: center; }
.tl-body { margin-top: 4px; white-space: pre-wrap; line-height: 1.5; }
.tl-meta { font-size: 12px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.crm-type { font-weight: 600; color: var(--graphite); }

/* Venue crew notes */
.crm-crew-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .crm-crew-notes { grid-template-columns: 1fr; } }
.crm-crew { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 14px 16px; }
.crm-crew h3 { margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.crm-crew h3 .crm-ico { color: var(--steel); }
.crm-crew .crm-notes { font-size: 15px; }

/* Pipeline board — quiet columns, show cards carry their tape */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 16px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.kanban-col { background: transparent; border-top: 1px solid var(--rule); display: flex; flex-direction: column; min-height: 200px; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px 10px; }
.kanban-name { display: flex; align-items: center; gap: 8px; }
.crm-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.crm-stage-dot.st-hold, .crm-stage-dot.st-quoted { background: var(--warn); } .crm-stage-dot.st-confirmed { background: var(--ok); }
.kanban-total { font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.kanban-cards { display: flex; flex-direction: column; gap: 10px; }
.kanban-card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 12px 14px 12px 18px; cursor: pointer; box-shadow: inset 5px 0 0 var(--tape); }
.kanban-card:hover { border-color: var(--steel); }
.kanban-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 20px; }
.kanban-title { display: block; font-weight: 600; color: var(--graphite); margin: 6px 0 2px; line-height: 1.3; }
.kanban-client { font-size: 13px; }
.kanban-venue { font-size: 13px; margin-top: 1px; }
.kanban-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-top: 8px; color: var(--steel); }
.kanban-meta strong { color: var(--graphite); font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.kanban-move-wrap { display: block; margin-top: 10px; }
.kanban-move { width: 100%; font-size: 13px; height: 32px; padding: 0 8px; color: var(--graphite); background: var(--paper); }
.kanban-empty { text-align: center; color: var(--steel); font-size: 13px; padding: 20px 0; border: 1px dashed var(--rule); border-radius: var(--r-panel); }
.crm-head > div:first-child { flex: 1 1 420px; min-width: 0; }
