.crm-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 18px; margin-bottom: 26px; }
.crm-stats article { display: flex; flex-direction: column; gap: 8px; }
.crm-stats strong { font-size: 28px; }
.crm-board { display: flex; gap: 16px; overflow-x: auto; align-items: stretch; padding: 4px 0 18px; }
.crm-column { flex: 0 0 265px; background: var(--brand-soft); border: 1px solid var(--line); border-top: 4px solid var(--stage-color); border-radius: 10px; height: min(65vh, 750px); overflow-y: auto; }
.crm-column > header { padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px; position: sticky; top: 0; background: var(--brand-soft); z-index: 1; }
.crm-column h2 { font-size: 15px; }
.crm-cards { padding: 0 12px 16px; min-height: 140px; }
.crm-card { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 12px; overflow-wrap: anywhere; }
[data-color-scheme=dark] .crm-card { background: #19282f; }
.crm-card h3 { margin-bottom: 10px; }
.crm-card p { font-size: 12px; margin: 5px 0; }
.crm-drop { outline: 2px solid var(--brand); outline-offset: -2px; }
.crm-slate { --stage-color: #64748b; }.crm-blue { --stage-color: #3b82f6; }.crm-amber { --stage-color: #d99b08; }.crm-purple { --stage-color: #a855f7; }.crm-orange { --stage-color: #f97316; }.crm-emerald { --stage-color: #10b981; }.crm-teal { --stage-color: #14b8a6; }.crm-red { --stage-color: #ef4444; }.crm-rose { --stage-color: #e87998; }
.crm-badge { display: inline-block; border: 1px solid var(--stage-color); border-left: 5px solid var(--stage-color); border-radius: 5px; padding: 4px 10px; margin: 16px 0; font-size: 12px; }
.crm-dialog { width: min(650px,calc(100vw - 30px)); max-height: 88dvh; overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.crm-dialog::backdrop { background: #0008; }
.crm-dialog header, .crm-dialog footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.crm-dialog header { margin-bottom: 20px; }.crm-dialog footer { margin-top: 20px; justify-content: flex-end; }
.crm-dialog fieldset { border: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.crm-dialog label { display: grid; gap: 6px; }
.crm-dialog input, .crm-dialog select, .crm-dialog textarea { width: 100%; }
.crm-dialog [aria-pressed=true] { outline: 2px solid var(--brand); }
.crm-details { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; }.crm-details dd { margin: 0; overflow-wrap: anywhere; }.crm-details dt { color: var(--muted); }
.crm-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 300px; overflow: auto; }
@media(max-width:600px) { .crm-stats { grid-template-columns: 1fr; }.crm-dialog { padding: 18px; } }

.crm-cyan { --stage-color: #0891b2; }
.crm-card .crm-source { margin-bottom: 10px; }
.crm-card > strong { display: block; }
.crm-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin: 16px 0; padding-bottom: 10px; }
.crm-tabs button { padding: 8px 14px; border-radius: 6px; }
.crm-tabs button[aria-pressed=true] { background: #163957; color: white; }
[data-color-scheme=dark] .crm-tabs button[aria-pressed=true] { background: #225982; color: white; }
.crm-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin: 20px 0; }
.crm-filters label { display: grid; gap: 5px; min-width: 130px; font-size: 12px; }
.crm-filters label:first-child { flex: 1; min-width: 230px; }
.crm-filters input, .crm-filters select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.crm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crm-table { width: 100%; border-collapse: collapse; text-align: left; }
.crm-table td, .crm-table th { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
.crm-table th { font-size: 12px; color: var(--muted); white-space: nowrap; }
.crm-contact-history { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.crm-contact-history label { margin: 12px 0; }
.crm-history-list article { padding: 15px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.crm-history-list article header { margin-bottom: 8px; }
.crm-record-form { padding: 14px; margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; }
.crm-record-form .form-stack { margin-top: 15px; }
.crm-deal-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.crm-customer-label { color: var(--brand); font-weight: 700; }

.crm-clickable-row { cursor: pointer; transition: background 120ms ease; }
.crm-clickable-row:hover, .crm-clickable-row:focus-within { background: var(--brand-soft); }
.crm-table td { vertical-align: middle; }
.crm-table td > small { display: block; margin-top: 5px; color: var(--muted); }
.crm-pagination { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px; font-size: 13px; color: var(--muted); }
.crm-pagination > div { display: flex; align-items: center; gap: 14px; }
.crm-pagination button { padding: 8px 14px; }
.crm-back { display: inline-block; margin-bottom: 24px; }
.crm-profile-grid { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 24px; align-items: start; }
.crm-profile-summary { padding: 24px; }
.crm-profile-summary h2 { font-size: 16px; margin-bottom: 18px; }
.crm-profile-summary h3 { font-size: 14px; }
.crm-profile-summary dl { margin: 20px 0; }
.crm-profile-summary dt { font-size: 12px; color: var(--muted); margin-top: 18px; }
.crm-profile-summary dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.crm-profile-value { font-size: 24px; font-weight: 700; }
.crm-profile-summary details { margin-top: 20px; }
.crm-delete-area { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.crm-profile-history { padding: 26px; min-width: 0; }
.crm-profile-history .crm-contact-history { border: 0; margin: 0; padding: 0; }
.crm-profile-history .crm-contact-history > .crm-customer-label { display: none; }
.crm-profile-history .crm-tabs { margin: 24px 0; }
.crm-history-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 18px; margin: 18px 0; }
.crm-profile label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; margin: 0; }
.crm-profile input, .crm-profile select, .crm-profile textarea, .crm-api-key input { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; background: var(--paper); color: var(--ink); font: inherit; }
.crm-profile input:focus, .crm-profile select:focus, .crm-profile textarea:focus, .crm-api-key input:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
.crm-profile fieldset { display: grid; gap: 16px; border: 0; padding: 0; min-width: 0; }
.crm-history-day { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 26px 0 14px; }
.crm-history-day::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.crm-history-list .crm-history-entry { border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 12px 0; background: var(--paper); }
.crm-history-entry header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crm-history-entry small, .crm-history-list article > small { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; }
.crm-history-entry.crm-entry-call { border-left: 3px solid #a855f7; }
.crm-history-entry.crm-entry-message { border-left: 3px solid #3b82f6; }
.crm-history-entry.crm-entry-note { border-left: 3px solid #d99b08; }
.crm-history-entry .crm-text { margin-top: 14px; line-height: 1.6; }
.crm-history-entry details { margin-top: 14px; }
.crm-api-key { display: grid; gap: 9px; padding: 18px; margin: 18px 0; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 10px; }
.crm-api-key label { font-size: 13px; font-weight: 650; }
.crm-api-key input { font-family: ui-monospace,monospace; font-size: 14px; }
.crm-api-key p { margin: 0; }
@media(max-width:850px) { .crm-profile-grid { grid-template-columns: 1fr; }.crm-profile-summary dl { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 10px; }.crm-profile-summary dt,.crm-profile-summary dd { margin: 0; } }
@media(max-width:550px) { .crm-history-filters { grid-template-columns: 1fr; }.crm-pagination { flex-direction: column; align-items: stretch; }.crm-pagination > div { justify-content: space-between; }.crm-profile-history,.crm-profile-summary { padding: 18px; } }

.crm-profile-summary hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.crm-pagination button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.crm-chat { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.crm-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.crm-chat-header small { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }
.crm-chat-tools,.crm-compose-toolbar,.crm-compose-toolbar > div { display: flex; align-items: center; gap: 10px; }
.crm-chat-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 7px; font-size: 23px; }
.crm-chat-icon:hover { background: var(--brand-soft); }
.crm-chat-search { display: flex; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.crm-chat-timeline { height: clamp(220px,calc(100dvh - 780px),480px); overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; padding: 18px 20px; background: var(--paper); }
.crm-chat-empty { text-align: center; color: var(--muted); padding: 70px 16px; }
.crm-chat-timeline > .crm-history-day:first-child { margin-top: 0; }
.crm-older-messages { display: block; margin: 0 auto; font-size: 12px; }
.crm-chat-message { width: fit-content; max-width: 88%; padding: 14px 16px; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white); overflow-wrap: anywhere; }
.crm-chat-message.crm-chat-outgoing { margin-left: auto; background: var(--brand-soft); }
.crm-call-entry { width: min(100%,440px); max-width: 96%; margin: 20px 0; overflow-wrap: anywhere; }
.crm-call-outgoing { margin-left: auto; }
.crm-call-byline { display: flex; justify-content: space-between; gap: 12px; margin: 0 8px 7px; font-size: 11px; color: var(--muted); }
.crm-call-card { background: var(--brand-soft); border-radius: 18px; padding: 14px 12px 10px; }
.crm-call-incoming .crm-call-card { background: color-mix(in srgb,var(--ink) 7%,var(--white)); }
.crm-call-heading { display: flex; align-items: center; gap: 11px; margin: 0 2px 12px; }
.crm-call-heading > div { display: grid; gap: 3px; min-width: 0; }
.crm-call-heading strong { font-size: 14px; font-weight: 600; }
.crm-call-heading > div > span { font-size: 12px; color: var(--muted); }
.crm-call-symbol { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: #2475e9; color: white; }
.crm-call-ai .crm-call-symbol { background: #a044e7; }
.crm-call-missed .crm-call-symbol { background: #b43a43; }
.crm-call-card audio { display: block; width: 100%; min-width: 0; height: 38px; border-radius: 9px; }
.crm-call-recording-empty { margin: 0 3px 4px; font-size: 11px; color: var(--muted); }
.crm-call-summary { position: relative; margin: 12px 0 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.crm-call-summary::before { content: ''; position: absolute; left: -15px; top: -8px; width: 10px; height: 24px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 8px; }
.crm-call-summary-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.crm-call-summary-heading strong { font-size: 12px; font-weight: 600; }
.crm-call-summary-heading strong span { color: #a855f7; }
.crm-call-summary-heading button { padding: 2px 0; font-size: 11px; color: var(--muted); }
.crm-call-summary-text,.crm-call-transcript { white-space: pre-wrap; font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
.crm-call-summary-text { color: var(--muted); }
.crm-call-job,.crm-call-next-steps { margin-top: 16px; font-size: 12px; line-height: 1.5; }
.crm-call-job strong,.crm-call-next-steps strong { font-size: 12px; font-weight: 600; }
.crm-call-job dl { display: grid; gap: 3px; margin: 9px 0 0; }
.crm-call-job dt { margin-top: 6px; color: var(--ink); }
.crm-call-job dd { margin: 0; color: var(--muted); }
.crm-call-next-steps ul { padding-left: 17px; margin: 7px 0 0; color: var(--muted); }
.crm-call-details { margin: 9px 4px 0 14px; font-size: 11px; color: var(--muted); }
.crm-call-details summary { cursor: pointer; }
.crm-call-details label { display: grid; gap: 5px; margin-top: 10px; max-width: 190px; font-size: 12px; }
.crm-call-details select { width: 100%; font-size: 12px; }
.crm-chat-message header { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: 12px; }
.crm-chat-message small,.crm-chat-message time { font-size: 11px; color: var(--muted); }
.crm-chat-message time { display: block; margin-top: 8px; text-align: right; }
.crm-chat-message .crm-text { margin: 8px 0; line-height: 1.5; }
.crm-chat-message details { margin-top: 10px; }
.crm-chat-composer { padding: 14px 18px; border-top: 1px solid var(--line); }
.crm-chat-composer > p { margin: 0 0 10px; }
.crm-compose-box { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--paper); overflow: hidden; }
.crm-compose-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.crm-compose-box textarea { display: block; box-sizing: border-box; width: 100%; margin: 0; padding: 14px 14px 8px; border: 0; border-radius: 0; outline: none; box-shadow: none; resize: none; min-height: 160px; max-height: min(320px, 40dvh); overflow-y: auto; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.5; font-weight: normal; }
.crm-compose-toolbar { justify-content: space-between; padding: 8px 10px 10px; }
.crm-compose-send { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; margin-left: auto; flex-shrink: 0; }
.crm-compose-send svg { flex-shrink: 0; }
.crm-chat-composer > small { display: block; margin-top: 9px; font-size: 11px; }
.crm-emoji-picker { display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; border-top: 1px solid var(--line); }
.crm-emoji-picker button { font-size: 22px; padding: 6px; }
.crm-compose-files { list-style: none; margin: 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crm-compose-files li { background: var(--brand-soft); border-radius: 6px; padding: 4px 8px; font-size: 12px; overflow-wrap: anywhere; }
.crm-chat .crm-record-form { margin: 12px; }
@media(max-width:550px) { .crm-profile-history { padding: 10px; }.crm-chat-timeline { padding: 12px; }.crm-chat-message { max-width: 95%; }.crm-chat-header { padding: 12px; }.crm-chat-composer { padding: 12px; } }
.crm-chat-composer button:disabled { opacity: .5; cursor: not-allowed; }
.crm-inline-field { display: inline-block; max-width: 100%; vertical-align: middle; }
.crm-inline-trigger { border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; font: inherit; text-align: left; padding: 4px; cursor: text; display: inline-flex; align-items: center; gap: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-table .crm-inline-trigger { white-space: nowrap; overflow-wrap: normal; }
.crm-inline-trigger:hover,.crm-inline-trigger:focus-visible { border-color: var(--line); background: var(--brand-soft); }
.crm-inline-pencil { opacity: 0; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.crm-inline-trigger:hover .crm-inline-pencil,.crm-inline-trigger:focus-visible .crm-inline-pencil { opacity: 1; }
.crm-inline-controls { display: flex; gap: 4px; align-items: start; min-width: 120px; }
.crm-inline-controls input,.crm-inline-controls select,.crm-inline-controls textarea { width: 100%; min-width: 0; border: 1px solid var(--brand); border-radius: 5px; padding: 8px; color: var(--ink); background: var(--paper); font: inherit; font-size: 14px; }
.crm-inline-field [role=alert] { display: block; color: #bf382c; max-width: 260px; font-size: 12px; margin-top: 5px; }
.crm-inline-field [role=status] { display: block; color: var(--muted); font-size: 11px; }
.crm-row-open { display: inline-block; padding: 5px; color: var(--muted); }
.crm-empty-results { padding: 42px 24px; text-align: center; color: var(--muted); }
.crm-empty-results svg { margin-bottom: 12px; opacity: .65; }
.crm-empty-results h3 { color: var(--ink); font-size: 16px; margin: 0 0 8px; }
.crm-empty-results p { margin: 0 0 18px; }
.crm-profile-summary section { margin-top: 20px; }
.crm-profile-summary .crm-inline-field { width: 100%; }
.crm-profile h1 .crm-inline-trigger { font-size: inherit; font-weight: inherit; }

.crm-duplicate-badge { display: inline-flex; margin: .35rem 0; padding: .2rem .55rem; border: 1px solid #b88625; border-radius: 1rem; color: var(--ink); background: color-mix(in srgb, #eab308 14%, var(--paper)); font-size: .72rem; font-weight: 600; text-decoration: none; }
.crm-merge-page { max-width: 1100px; margin: 0 auto; }
.crm-merge-picker { display: grid; gap: .6rem; max-width: 650px; margin: 1.5rem 0; }
.crm-merge-fields { border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin: 1.5rem 0; min-width: 0; }
.crm-merge-fields legend { padding: 0 .5rem; font-weight: 700; }
.crm-merge-grid { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; align-items: start; }
.crm-merge-choice { display: flex; align-items: flex-start; gap: .65rem; margin: .5rem 0; cursor: pointer; overflow-wrap: anywhere; }
.crm-merge-choice input[type=radio] { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .2rem; }
.crm-merge-choice small { display: block; margin-top: .3rem; color: var(--muted); }
.crm-merge-deals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1rem; }
.crm-preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-merge-audit { margin-top: .75rem; overflow-wrap: anywhere; }
.crm-merge-audit section { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.crm-merge-audit dd { margin: 0 0 .5rem; }
@media (max-width: 640px) { .crm-merge-grid { grid-template-columns: 1fr 1fr; } .crm-merge-grid > strong { grid-column: 1 / -1; } }

.crm-merge-confirm-details { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 16px; margin: 20px 0; }
.crm-merge-confirm-details dt { color: var(--muted); }
.crm-merge-confirm-details dd { margin: 0; overflow-wrap: anywhere; }

.crm-deal-type-select { display: flex; flex-direction: column; gap: 8px; min-width: 0; width: 100%; }
.crm-deal-type-select select, .crm-deal-type-select input { width: 100%; min-width: 0; }

.crm-contact-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.crm-contact-heading > div { min-width: 0; }
.crm-contact-heading h1 { font-size: 24px; margin: 0; }
.crm-contact-heading .eyebrow { margin: 0 0 6px; }
.crm-contact-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 28px; font-weight: 700; }
.crm-contact-actions { display: flex; gap: 10px; margin: 18px 0; }
.crm-contact-action { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--brand); }
.crm-contact-action:disabled { opacity: .45; cursor: default; }
.crm-contact-since { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 18px 0; }
.crm-deals-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.crm-deals-heading h2 { margin: 0; }
.crm-conversation-docks { pointer-events: none; position: fixed; right: 24px; bottom: 18px; z-index: 60; max-width: calc(100vw - 48px); }
.crm-dock-windows { display: flex; align-items: flex-end; gap: 12px; max-width: calc(100vw - 48px); overflow-x: auto; padding-top: 12px; }
.crm-dock-notice { pointer-events: auto; margin: 0 0 8px auto; padding: 12px 16px; max-width: 420px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); box-shadow: 0 4px 18px #0002; }
.crm-conversation-dock { pointer-events: auto; position: relative; flex: 0 0 clamp(280px,calc((100vw - 84px) / var(--crm-window-count)),420px); width: clamp(280px,calc((100vw - 84px) / var(--crm-window-count)),420px); max-height: calc(100dvh - 110px); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 40px #0003; overflow: hidden; }
.crm-dock-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.crm-dock-title { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.crm-dock-title > span { overflow-wrap: anywhere; min-width: 0; }
.crm-dock-title svg { flex-shrink: 0; }
.crm-dock-title small { display: block; color: var(--muted); font-size: 11px; }
.crm-dock-content { min-height: 0; overflow-y: auto; }
.crm-conversation-dock .crm-chat { height: auto; border: 0; margin: 0; min-height: 0; }
.crm-conversation-dock .crm-chat-timeline { height: clamp(180px,42dvh,480px); min-height: 0; flex: none; }
.crm-conversation-dock .crm-chat-header { padding: 10px 14px; }
.crm-conversation-dock .crm-chat-header > div:first-child { display: none; }
.crm-conversation-dock .crm-chat-tools { width: 100%; justify-content: flex-end; }
.crm-conversation-dock .crm-chat-composer { padding: 12px; }
.crm-conversation-dock .crm-chat-composer > p { margin: 0 0 8px; font-size: 11px; }
.crm-conversation-dock .crm-email-subject { display: grid; gap: 5px; margin-bottom: 10px; font-size: 12px; }
.crm-email-subject input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.crm-delivery-status { color: var(--muted); font-size: 11px; }
@media (max-width: 600px) {
  .crm-conversation-docks { right: 8px; bottom: 8px; max-width: calc(100vw - 16px); }
  .crm-dock-windows { max-width: calc(100vw - 16px); }
  .crm-conversation-dock { flex-basis: calc(100vw - 16px); width: calc(100vw - 16px); max-height: calc(100dvh - 32px); }
  .crm-conversation-dock input, .crm-conversation-dock textarea { font-size: 16px; }
}
.crm-conversation-dock textarea, .crm-conversation-dock .crm-chat-search input { width: 100%; min-width: 0; color: var(--ink); }
.crm-conversation-dock textarea { padding: 8px; }
.crm-conversation-dock .crm-chat-search input { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.crm-conversation-dock img, .crm-conversation-dock video { max-width: 100%; }
.crm-dock-header > button:not(.crm-dock-title) { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 32px; padding: 4px; }
.crm-dock-channel:disabled { opacity: .4; cursor: default; }

/* Contact and deal profiles share aligned rows and roomy inline editors. */
.crm-profile-summary dl { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: baseline; gap: 16px 12px; }
.crm-profile-summary dl dt, .crm-profile-summary dl dd { margin: 0; min-width: 0; line-height: 1.6; }
.crm-profile-summary dl .crm-inline-trigger, .crm-contact-heading h1 .crm-inline-trigger { padding: 0; border: 0; }
.crm-profile-history .crm-tabs { margin: 0 0 24px; }
.crm-deals-heading { margin-bottom: 24px; }
.crm-deal-details { display: grid; gap: 24px; }
.crm-deal-details > section, .crm-deal-notes > section { margin: 0; }
.crm-deal-details-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.crm-deal-details-header h2 { margin: 0; font-size: 18px; }
.crm-deal-details-header > .crm-inline-field { min-width: 0; max-width: 260px; }
.crm-deal-details dl { display: grid; grid-template-columns: 130px minmax(0,1fr); margin: 0; gap: 0 20px; align-items: baseline; }
.crm-deal-details dt { color: var(--muted); }
.crm-deal-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.crm-deal-details dl dt, .crm-deal-details dl dd { padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.crm-deal-details dl .crm-inline-field { display: block; width: 100%; }
.crm-deal-details dl .crm-inline-trigger { padding: 0; border: 0; line-height: inherit; }
.crm-deal-details .crm-profile-value { font-size: 20px; }
.crm-profile-installation { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; }
.crm-profile-installation > div { min-width: 0; overflow-wrap: anywhere; }
.crm-profile-installation h2 { margin: 0 0 8px; font-size: 18px; }
.crm-profile-installation p { margin: 0; line-height: 1.6; }
.crm-profile-installation > .button, .crm-profile-installation > a { flex-shrink: 0; }
.crm-deal-notes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.crm-deal-notes h3 { margin: 0 0 12px; font-size: 14px; }
.crm-deal-notes .crm-inline-field { display: block; width: 100%; }
.crm-deal-notes .crm-inline-trigger { display: flex; align-items: flex-start; width: 100%; min-height: 132px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); line-height: 1.6; }
.crm-deal-notes .crm-inline-controls { width: 100%; min-width: 0; gap: 8px; }
.crm-deal-notes textarea { flex: 1; min-height: 132px; resize: vertical; line-height: 1.6; }
.crm-deal-details .crm-delete-area { margin: 0; padding: 0; border: 0; }
.crm-other-deals { margin-top: 24px; }
.crm-other-deals h3 { margin: 0 0 8px; font-size: 14px; }
.crm-deal-summary { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; }
.crm-deal-summary > button { min-width: 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .crm-deal-notes { grid-template-columns: 1fr; }
  .crm-profile-installation { align-items: flex-start; flex-direction: column; }
  .crm-deal-summary { grid-template-columns: minmax(0,1fr) auto; }
  .crm-deal-summary > button { grid-column: 1 / -1; }
}
@media (max-width: 550px) {
  .crm-profile-history { padding: 18px; }
  .crm-deal-details dl { grid-template-columns: 96px minmax(0,1fr); gap: 0 12px; }
  .crm-deal-details-header { flex-wrap: wrap; }
}

.crm-site-form { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.crm-site-form h3 { margin: 0 0 8px; }
.crm-site-form p { margin: 0 0 16px; }
.crm-site-form select + input { margin-top: 8px; }
.crm-valve-controls { flex-wrap: wrap; min-width: 0; }
.crm-valve-controls input { flex: 1 1 100%; }

.crm-sale-controls li { overflow-wrap:anywhere; }
.crm-sale-controls .form-actions { flex-wrap:wrap; }

.crm-unmatched .crm-table td { vertical-align: top; }
.crm-unmatched-action { min-width: 280px; max-width: 360px; }
.crm-contact-phones { margin: 18px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.crm-contact-phones h3 { font-size: 13px; margin-bottom: 8px; }
.crm-contact-phones summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.crm-contact-phones form { margin-top: 12px; }

.crm-unmatched-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.crm-unmatched-footer p { margin: 0; }

.crm-stage-filters { flex: 1 0 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.crm-filters .crm-stage-filters label { display: flex; align-items: center; gap: 7px; min-width: 0; flex: none; font-size: 12px; }
.crm-stage-filters input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--brand); }
.crm-stage-filters legend { font-size: 12px; padding: 0 6px; }
.crm-saved-views { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.crm-saved-views .crm-filters { margin: 0; }
.crm-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
@media (max-width: 600px) { .crm-saved-views .crm-filters > label, .crm-filters > label { width: 100%; min-width: 0; } .crm-saved-views .form-actions { display: flex; flex-wrap: wrap; gap: 8px; } }

.crm-water-testing { max-width: 460px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crm-water-testing .crm-water-testing-toggle { display: flex; align-items: center; gap: 8px; }
.crm-water-testing-toggle input { width: 18px; height: 18px; flex: none; }
.crm-water-testing .form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.crm-filter-toolbar { display: flex; align-items: end; gap: 12px; margin: 20px 0 12px; }
.crm-filter-toolbar > label { display: grid; gap: 6px; font-size: 12px; flex: 1; max-width: 440px; min-width: 0; }
.crm-filter-toolbar input { width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; box-sizing: border-box; }
.crm-filter-toolbar input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.crm-filter-trigger { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.crm-filter-count { background: var(--brand); color: white; border-radius: 20px; padding: 1px 7px; font-size: 12px; }
.crm-filter-overlay { width: min(820px,calc(100vw - 32px)); padding: 0; max-height: 88dvh; }
.crm-filter-overlay header { padding: 22px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.crm-filter-overlay h2, .crm-filter-overlay h3 { margin: 0; }
.crm-filter-overlay header p { margin: 6px 0 0; }
.crm-filter-body { padding: 8px 24px 24px; }
.crm-filter-overlay .crm-filter-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 20px 0 26px; }
.crm-filter-overlay .crm-filter-fields > label { min-width: 0; width: auto; }
.crm-filter-overlay .crm-stage-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; border: 1px solid var(--line); padding: 14px; }
.crm-filter-overlay .crm-stage-filters label { display: flex; align-items: center; gap: 8px; }
.crm-filter-overlay .crm-stage-filters input { width: 18px; flex: 0 0 18px; }
.crm-filter-save { border-top: 1px solid var(--line); padding-top: 22px; }
.crm-filter-overlay .crm-saved-views { border: 0; padding: 0; margin: 0; background: transparent; }
.crm-filter-overlay footer { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); margin: 0; padding: 16px 24px; justify-content: space-between; }
@media(max-width:600px) { .crm-filter-overlay header, .crm-filter-body { padding-left: 16px; padding-right: 16px; } .crm-filter-overlay .crm-filter-fields { grid-template-columns: 1fr; } .crm-filter-overlay footer { padding: 12px 16px; } .crm-filter-overlay footer > span { max-width: 45%; } }
.crm-filter-toolbar { flex-wrap: wrap; }
 .crm-view-bookmarks { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-view-bookmark { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.crm-view-bookmark button:first-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 10px; }
.crm-view-bookmark button[aria-pressed=true] { background: var(--brand-soft); color: var(--brand); }
.crm-saved-views .crm-bookmark-choice { display: flex; align-items: center; gap: 8px; }
.crm-saved-views .crm-bookmark-choice input { width: 18px; height: 18px; }
@media(max-width:600px) { .crm-filter-toolbar > label { flex-basis: 100%; max-width: none; } .crm-view-bookmarks { order: 3; width: 100%; } }

.crm-email-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 650; line-height: 1.4; white-space: nowrap; color: color-mix(in srgb, var(--email-status-color) 75%, var(--ink)); background: color-mix(in srgb, var(--email-status-color) 12%, var(--paper)); }
[data-color-scheme=dark] .crm-email-status { color: color-mix(in srgb, var(--email-status-color) 50%, var(--ink)); background: color-mix(in srgb, var(--email-status-color) 20%, var(--paper)); }

.crm-products-summary ul { margin:0 0 8px; padding-left:20px; }
.crm-products-summary li { margin-bottom:4px; }
.crm-product-sidebar { width:min(620px,100vw); }
.crm-product-sidebar > form { display:flex; flex-direction:column; flex:1; min-height:0; overflow-y:auto; }
.crm-product-sidebar .follow-up-sidebar-body { flex:none; overflow:visible; }
.crm-product-sidebar fieldset { padding:0; border:0; margin:16px 0 0; min-width:0; }
.crm-product-search { display:grid; gap:8px; }
.crm-product-search input, .crm-product-footer input { width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); }
.crm-product-option { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.crm-product-option input { width:18px; height:18px; }
.crm-product-option strong { white-space:nowrap; font-size:.875rem; }
.crm-product-footer { border-top:1px solid var(--line); padding:16px 24px; }
.crm-product-footer dl { display:grid; grid-template-columns:1fr auto; gap:6px 16px; margin:0 0 12px; }
.crm-product-footer dd { margin:0; text-align:right; }
.crm-product-footer label { display:grid; gap:6px; }
.crm-product-footer .form-actions { justify-content:flex-end; }
@media(max-width:480px) { .crm-product-footer { padding:12px 16px; } .crm-product-option { gap:8px; } }

.crm-sort-heading { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.crm-sort-heading:hover { text-decoration: underline; }
.crm-sort-heading:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

.crm-follow-up-ai { margin:12px 0; padding:12px 0; border-bottom:1px solid var(--line); }
.crm-follow-up-ai p { margin:0 0 8px; }
.crm-ai-control-link { padding:0; border:0; background:transparent; color:var(--brand); font:inherit; text-decoration:underline; cursor:pointer; }
.crm-ai-control-link:disabled { opacity:.5; cursor:wait; }

.crm-contractor-payment, .crm-starting-quote { color:#23834b; }
[data-color-scheme="dark"] .crm-contractor-payment, [data-color-scheme="dark"] .crm-starting-quote { color:#80d8ac; }

.crm-chat-loading{display:flex;align-items:center;justify-content:center;min-height:96px;color:var(--muted)}
.crm-chat-loading-inline{display:inline-flex;min-height:0;vertical-align:middle}
.crm-chat-spinner{animation:crm-chat-spin .8s linear infinite}
@keyframes crm-chat-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.crm-chat-spinner{animation:none}}

.crm-email-status.crm-email-status--viewed { color: #052e16; background: #4ade80; border: 1px solid #16a34a; font-weight: 750; }
.crm-email-status--viewed::before { content: "✓"; margin-right: 5px; font-weight: 800; }
.crm-source, .crm-stage-badge { --email-status-color: var(--stage-color); }

.crm-referral-results { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; gap: 4px; }
.crm-referral-results button { text-align: left; }
.referral-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: referral-spin .7s linear infinite; }
@keyframes referral-spin { to { transform: rotate(360deg); } }

.crm-address-input { position: relative; display: block; width: 100%; min-width: 0; }
.crm-address-input > input { width: 100%; }
.crm-address-input > small:empty { display: none; }
.crm-address-popup { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; display: block; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #0003; overflow: hidden; }
.crm-address-popup [role=listbox] { display: block; max-height: 240px; overflow-y: auto; }
.crm-address-option { display: block; padding: 12px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.crm-address-option:hover, .crm-address-option[aria-selected=true] { background: var(--brand-soft); }
.crm-address-attribution { display: block; padding: 8px 12px; text-align: right; font: 400 14px Arial, sans-serif; white-space: nowrap; letter-spacing: normal; background: #fff; color: #5e5e5e; }

/* CRM conversations share the Pings palette, bubble shape and compact actions. */
.crm-chat, .crm-chat .crm-chat-header, .crm-chat .crm-chat-timeline, .crm-chat .crm-chat-composer { background: var(--chat-surface); color: var(--chat-text); border-color: var(--chat-line); }
.crm-chat .crm-chat-timeline { padding-top: 28px; }
.crm-chat .crm-chat-message { display: flex; gap: 9px; align-items: flex-end; width: 100%; max-width: 100%; padding: 12px 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.crm-chat .crm-chat-outgoing { flex-direction: row-reverse; }
.crm-message-avatar { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; margin-bottom: 24px; border-radius: 50%; background: var(--chat-incoming); color: var(--chat-text); font-size: 10px; font-weight: 600; }
.crm-message-content { position: relative; min-width: 0; max-width: min(82%, 560px); }
.crm-message-byline { margin: 0 12px 5px; font-size: 11px; color: var(--chat-muted); }
.crm-message-byline a { color: inherit; }
.crm-chat-outgoing .crm-message-byline { text-align: right; }
.crm-message-bubble { padding: 10px 14px; border-radius: 19px 19px 19px 5px; background: var(--chat-incoming); color: var(--chat-text); overflow-wrap: anywhere; }
.crm-chat-outgoing .crm-message-bubble { background: #2675f5; color: #fff; border-radius: 19px 19px 5px 19px; }
.crm-chat-outgoing .crm-message-bubble a, .crm-chat-outgoing .crm-message-bubble small { color: #fff; }
.crm-message-subject { display: block; padding-bottom: 7px; margin-bottom: 7px; border-bottom: 1px solid #ffffff40; font-size: 13px; }
.crm-chat .crm-message-bubble .crm-text { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.crm-chat .crm-message-bubble .crm-text + .crm-text { margin-top: 10px; }
.crm-message-meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin: 5px 12px 0; }
.crm-chat-outgoing .crm-message-meta { justify-content: flex-end; }
.crm-chat .crm-message-meta time, .crm-chat .crm-message-meta .crm-delivery-status { display: inline; margin: 0; color: var(--chat-muted); font-size: 10px; }
.crm-chat .crm-message-meta .crm-delivery-failed, .crm-chat .crm-message-error { color: #d74b53; }
.crm-chat .crm-message-meta .crm-delivery-viewed, .crm-chat .crm-message-meta .crm-delivery-opened { color: #21a66c; font-weight: 600; }
.crm-message-error { display: block; margin-top: 6px; }
.crm-message-actions { position: absolute; z-index: 3; right: 0; bottom: calc(100% - 20px); display: flex; padding: 4px; border: 1px solid var(--chat-line); border-radius: 12px; background: var(--chat-surface); box-shadow: 0 5px 18px #0002; visibility: hidden; opacity: 0; }
.crm-chat-message:hover .crm-message-actions, .crm-chat-message:focus-within .crm-message-actions { visibility: visible; opacity: 1; }
.crm-message-actions button { display: grid; place-items: center; width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 7px; background: transparent; color: var(--chat-muted); cursor: pointer; }
.crm-message-actions button:hover { background: var(--chat-hover); color: var(--chat-text); }
.crm-message-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.crm-chat-message:focus-visible { outline: 2px solid #2675f5; outline-offset: 2px; }
.crm-chat .crm-compose-box { border-radius: 18px; background: var(--chat-surface); border-color: var(--chat-line); }
.crm-chat .crm-compose-box textarea { padding: 14px; color: var(--chat-text); }
.crm-chat .crm-compose-send { background: #2675f5; border-color: #2675f5; border-radius: 50%; width: 34px; height: 34px; }
.crm-chat .crm-email-subject { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--chat-muted); font-size: 12px; }
.crm-chat .crm-email-subject input { flex: 1; min-width: 0; padding: 9px; border: 1px solid var(--chat-line); border-radius: 10px; background: var(--chat-surface); color: var(--chat-text); }
.crm-emoji-popover { position: fixed; inset: auto; margin: 0; padding: 9px; border: 1px solid var(--chat-line); border-radius: 14px; background: var(--chat-surface); color: var(--chat-text); box-shadow: 0 12px 40px #0004; }
.crm-emoji-popover:popover-open { display: grid; grid-template-columns: repeat(6, 34px); gap: 3px; }
.crm-emoji-popover button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; font-size: 23px; background: transparent; }
.crm-emoji-popover button:hover { background: var(--chat-hover); }
.crm-chat .crm-call-card { border-radius: 19px; }
.crm-chat .crm-call-details-trigger { margin-top: 8px; font-size: 11px; }
@media (hover: none) { .crm-message-actions { position: static; justify-content: flex-end; visibility: visible; opacity: 1; box-shadow: none; width: fit-content; margin-left: auto; margin-bottom: 5px; } }
.crm-chat .crm-message-byline { display: block; font-size: 11px; font-weight: 400; }
.crm-conversation-dock { background: #fff; }
.crm-conversation-dock .crm-dock-header { background: #fff; border-color: #e1e3e8; }
[data-color-scheme="dark"] .crm-conversation-dock, [data-color-scheme="dark"] .crm-conversation-dock .crm-dock-header { background: #16171b; border-color: #35363d; }
.crm-chat .crm-chat-search { border-color: var(--chat-line); }
.crm-chat .crm-chat-search input { background: var(--chat-surface); color: var(--chat-text); border-color: var(--chat-line); }
/* Keep the composer and send button visible; only the message history scrolls. */
.crm-conversation-dock:not([data-minimized]) { height: min(820px, calc(100dvh - 110px)); }
.crm-conversation-dock .crm-dock-header { flex-shrink: 0; }
.crm-conversation-dock .crm-dock-content:not([hidden]) { display: flex; flex: 1; overflow: hidden; }
.crm-conversation-dock .crm-dock-content > .crm-chat { display: flex; flex-direction: column; flex: 1; width: 100%; }
.crm-conversation-dock .crm-chat-timeline { flex: 1; height: auto; min-height: 60px; }
.crm-conversation-dock .crm-chat-header, .crm-conversation-dock .crm-chat-composer, .crm-conversation-dock .crm-chat-search { flex-shrink: 0; }
.crm-conversation-dock .crm-compose-box textarea { max-height: min(280px, 30dvh); }
[data-color-scheme=dark] .crm-conversation-dock .crm-chat .crm-chat-composer .crm-compose-box textarea,
[data-color-scheme=dark] .crm-conversation-dock .crm-chat .crm-chat-composer .crm-email-subject input { background-color: var(--chat-surface); color: var(--chat-text); border-color: var(--chat-line); }
@media(max-width:600px) {
  .crm-conversation-dock:not([data-minimized]) { height: calc(100dvh - 32px); }
  .crm-conversation-dock .crm-compose-box textarea { min-height: 100px; max-height: 24dvh; }
}
.crm-chat .crm-history-day { justify-content: center; color: var(--chat-muted); font-size: 11px; }
.crm-chat .crm-history-day::after { display: none; }
.crm-message-bubble .attachments { margin: 10px 0 0; gap: 8px; }
.crm-message-bubble .attachment { max-width: 100%; min-width: 0; }
.crm-message-bubble .attachment-photo img, .crm-message-bubble .attachment-file-icon, .crm-message-bubble audio { max-width: 100%; }

/* Keep agreement checkboxes out of the modal's full-width input/grid rules. */
.crm-agreement-generator .crm-agreement-status-row { padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.crm-agreement-status-row > strong { display: block; font-size: 14px; }
.crm-agreement-status-row > .muted { margin: 4px 0 12px; font-size: 13px; }
.crm-dialog .crm-agreement-generator .crm-agreement-outside { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.crm-dialog .crm-agreement-generator .crm-agreement-outside input[type=checkbox] { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: var(--brand); }
.crm-agreement-outside span { min-width: 0; line-height: 1.5; }
.crm-dialog .crm-agreement-generator > footer { margin-top: 0; flex-wrap: wrap; }

img.image-loading {
  min-width: 24px;
  min-height: 24px;
  background: center / 24px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23899ca6' stroke-opacity='.25' stroke-width='2'/%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' fill='none' stroke='%23899ca6' stroke-width='2'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
}
