:root {
  color-scheme: light;
  --crm-ink: #15252a;
  --crm-muted: #586b7c;
  --crm-green: #256552;
  --crm-green-dark: #1b5243;
  --crm-sage: #f3f8f6;
  --crm-selected: #e5f0eb;
  --crm-line: #e3e9ed;
  --crm-input-line: #cbd5dc;
  --crm-radius: 9px;
  --crm-sidebar: 280px;
}
* { box-sizing: border-box; }
body.crm { margin: 0; font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--crm-ink); background: #fff; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a, button, summary { touch-action: manipulation; }
button { background: none; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .58; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--crm-input-line); border-radius: 7px; background: #fff; padding: 11px 13px; }
input, select { min-height: 44px; }
input::placeholder, textarea::placeholder { color: #657686; opacity: 1; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--crm-green); flex: 0 0 18px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #ad3540; }
:focus-visible { outline: 3px solid #237a68; outline-offset: 3px; }
[hidden] { display: none !important; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 650; }
figure, p, h1, h2, h3, dl { margin: 0; }
h1, h2, h3 { line-height: 1.2; font-weight: 650; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(29px, 2.8vw, 42px); letter-spacing: -1.5px; }
h2 { font-size: 23px; letter-spacing: -.6px; }
h3 { font-size: 16px; letter-spacing: -.2px; }
small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -100px; padding: 12px 20px; background: var(--crm-green); color: white; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.muted, .field-hint { color: var(--crm-muted); }
.text-link { color: var(--crm-green); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--crm-green-dark); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--crm-input-line); border-radius: 7px; padding: 10px 17px; background: #fff; font-weight: 500; line-height: 1.35; text-align: center; transition: background .16s, border-color .16s, box-shadow .16s; }
.button:hover { background: #f4f8f6; border-color: #9bafa7; }
.button-primary { background: var(--crm-green); border-color: var(--crm-green); color: #fff; box-shadow: inset 0 0 0 1px #ffffff0d; }
.button-primary:hover { background: var(--crm-green-dark); border-color: var(--crm-green-dark); }
.button-small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.button-large { min-height: 65px; font-size: 18px; }
.button-danger { background: #a42e3b; color: white; border-color: #a42e3b; }
.button-danger:hover { background: #81232e; color: white; }
.button-text-danger { color: #a42e3b; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; min-height: 40px; padding: 8px; border: 0; border-radius: 7px; color: var(--crm-muted); }
.icon-button:hover { background: var(--crm-selected); color: var(--crm-green); }
.icon-button .bi { font-size: 20px; }
.wordmark { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; letter-spacing: -1px; font-size: 28px; line-height: 1.2; }
.wordmark strong { color: #205f4e; font-weight: 650; }
.wordmark span { font-size: .74em; letter-spacing: -.6px; font-weight: 400; }
.sidebar { width: var(--crm-sidebar); position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; background: var(--crm-sage); border-right: 1px solid var(--crm-line); padding: 25px 18px 22px; overflow-y: auto; }
.sidebar-brand { padding: 0 14px 26px; display: flex; align-items: center; justify-content: space-between; }
.account-switch { display: flex; align-items: center; background: white; border: 1px solid var(--crm-input-line); border-radius: 7px; margin: 0 14px 21px; min-height: 46px; padding-left: 12px; gap: 6px; }
.account-switch > .bi { font-size: 20px; }
.account-switch select { padding: 8px 0; border: 0; font-size: 14px; background: transparent; }
.account-switch .icon-button { min-width: 26px; width: 26px; }
.account-switch .icon-button .bi { font-size: 16px; }
.sidebar-search { display: flex; align-items: center; border: 1px solid var(--crm-input-line); border-radius: 7px; margin: 0 14px 27px; padding-left: 12px; background: #fff; color: var(--crm-muted); }
.sidebar-search input { min-height: 42px; border: 0; background: transparent; font-size: 13px; padding: 8px 9px; }
.sidebar-search > .bi { font-size: 18px; }
.sidebar-search .icon-button { min-width: 27px; width: 27px; }
.sidebar-search .icon-button .bi { font-size: 15px; }
.primary-nav { display: grid; gap: 4px; }
.primary-nav > a, .help-link { display: flex; align-items: center; gap: 18px; border-radius: 7px; padding: 13px 18px; min-height: 49px; color: #263947; }
.primary-nav > a > .bi, .help-link > .bi { font-size: 23px; line-height: 1; }
.primary-nav > a:hover, .help-link:hover { background: #eaf1ed; }
.primary-nav > a[aria-current="page"], .help-link[aria-current="page"] { color: #175540; background: var(--crm-selected); font-weight: 600; }
.count-badge { display: inline-flex; justify-content: center; align-items: center; padding: 3px 10px; min-height: 26px; border-radius: 20px; background: #e4f0ff; color: #0756a8; font-size: 14px; font-weight: 600; }
.primary-nav .count-badge { margin-left: auto; }
.nav-heading { border-top: 1px solid #d8e2e5; padding-top: 23px; margin: 19px 14px 8px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .8px; color: var(--crm-muted); }
.sidebar-bottom { margin: auto 14px 0; padding-top: 28px; }
.help-link { border-top: 1px solid #d8e2e5; border-radius: 0; padding: 20px 5px; }
.identity { display: flex; gap: 12px; padding: 15px 0 2px; align-items: center; }
.identity strong, .identity small { display: block; }
.identity strong { font-weight: 550; }
.identity small { color: var(--crm-muted); }
.avatar { display: inline-flex; flex: 0 0 44px; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 500; font-size: 15px; }
.avatar-large { width: 62px; height: 62px; flex-basis: 62px; font-size: 22px; }
.tone-sage { color: #15553e; background: #e0f1e8; }
.tone-blue { color: #0956a5; background: #e6f1ff; }
.tone-orange { color: #a34609; background: #fff0e3; }
.tone-violet { color: #453aa5; background: #edebff; }
.tone-neutral { color: #4a5e6d; background: #f0f3f5; }
.workspace { margin-left: var(--crm-sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 72px; padding: 13px 34px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 14px; }
.breadcrumb > a { color: var(--crm-muted); }
.topbar-actions { display: flex; gap: 22px; align-items: center; }
.profile-menu { position: relative; }
.profile-menu > summary { display: flex; border-radius: 50%; list-style: none; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; top: calc(100% + 9px); right: 0; width: 250px; z-index: 40; padding: 6px; border: 1px solid var(--crm-line); border-radius: var(--crm-radius); background: #fff; box-shadow: 0 12px 32px #17362a1a; }
.menu-panel a, .menu-panel button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 5px; text-align: left; font-size: 14px; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--crm-sage); }
.main-content { padding: 9px 34px 20px; flex: 1; min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 23px; }
.page-heading p { font-size: 17px; margin-top: 7px; color: var(--crm-muted); }
.page-heading .button-primary { padding: 14px 26px; }
.panel { background: #fff; border: 1px solid var(--crm-line); border-radius: var(--crm-radius); min-width: 0; }
.panel-body { padding: 24px; }
.panel-body > h2 { margin-bottom: 14px; }
.panel-body > .muted { margin-bottom: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 23px 15px; }
.panel-heading p { margin-top: 6px; color: var(--crm-muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); border: 1px solid var(--crm-line); border-radius: var(--crm-radius); padding: 21px 0; background: white; margin-bottom: 10px; }
.kpi-card { display: flex; gap: 21px; padding: 2px 25px; min-width: 0; border-right: 1px solid var(--crm-line); }
.kpi-card:last-child { border-right: 0; }
a.kpi-card:hover { background: var(--crm-sage); }
.kpi-icon { width: 66px; height: 66px; flex: 0 0 66px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 27px; }
.kpi-title { display: block; font-size: 14px; color: var(--crm-muted); }
.kpi-value { display: block; font-size: 34px; letter-spacing: -.8px; line-height: 1.15; margin: 6px 0 2px; font-weight: 650; }
.kpi-meta { color: var(--crm-muted); font-size: 13px; }
.kpi-unavailable { font-size: 17px; line-height: 1.6; letter-spacing: 0; }
.below-cards { display: flex; justify-content: flex-end; margin: 8px 5px 24px; font-size: 13px; }
.contacts-panel { margin-top: 24px; }
.filters { padding: 0 21px 10px; }
.contacts-panel > .filters:first-child { padding-top: 18px; }
.filter-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .filter-toolbar { border-top: 1px solid var(--crm-line); padding-top: 12px; }
.contacts-panel > .filters:first-child .filter-toolbar { border-top: 0; padding-top: 0; }
.filter-select { max-width: 230px; flex: 0 1 auto; }
.filter-select select { font-size: 13px; min-height: 39px; padding: 8px 28px 8px 12px; }
.search-input { display: flex; align-items: center; border: 1px solid var(--crm-input-line); border-radius: 7px; padding-left: 13px; flex: 1 1 210px; min-width: 0; color: var(--crm-muted); }
.search-input input { border: 0; background: transparent; min-height: 39px; padding: 8px 12px; font-size: 13px; }
.search-input > .bi { font-size: 19px; }
.advanced-filters { font-size: 13px; margin-top: 8px; }
.advanced-filters > summary { display: inline-flex; gap: 8px; align-items: center; padding: 5px 0; color: var(--crm-muted); }
.advanced-filters[open] { padding-bottom: 10px; }
.advanced-filters[open] > summary { margin-bottom: 14px; }
.advanced-filters .form-grid { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { background: #f6f8f9; font-weight: 550; color: #506172; padding: 15px 18px; border-block: 1px solid var(--crm-line); }
td { border-bottom: 1px solid var(--crm-line); padding: 13px 18px; vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f2f8f5; }
.contacts-table th:first-child, .contacts-table td:first-child { padding-left: 23px; }
.contacts-table th, .contacts-table td { padding-right: 12px; }
.contact-cell { display: flex; gap: 14px; align-items: center; }
.contact-name { font-size: 14px; font-weight: 600; }
.contact-name:hover { color: var(--crm-green); text-decoration: underline; }
.cell-secondary { display: block; color: var(--crm-muted); font-size: 12px; margin-top: 3px; }
.contact-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.source-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; line-height: 1.25; }
.source-meditrust { color: #155b49; background: #e7f5ee; }
.source-medinoshow { color: #215a87; background: #e7f2ff; }
.source-manual { color: #664899; background: #f0eaff; }
.source-empty { display: block; margin-top: 6px; color: var(--crm-muted); font-size: 11px; }
.phone-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 13px; font-size: 12px; font-weight: 500; line-height: 1.4; }
.row-action { width: 42px; padding-left: 0; }
.row-action .icon-button { width: 30px; min-width: 30px; }
.row-action .bi { font-size: 16px; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 20px; color: var(--crm-muted); border-top: 1px solid var(--crm-line); font-size: 12px; }
.pagination-bar nav { display: flex; gap: 7px; flex-wrap: wrap; }
.pagination-bar .button-small { min-height: 32px; padding: 6px 11px; font-size: 12px; }
.refresh-label { display: inline-flex; gap: 8px; font-size: 12px; color: var(--crm-muted); }
.workspace-footer { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin: 0 34px; border-top: 1px solid var(--crm-line); padding: 15px 0 20px; color: var(--crm-muted); font-size: 12px; }
.workspace-footer > span:first-child { display: flex; align-items: center; gap: 10px; }
.workspace-footer .bi { font-size: 19px; }
.stack { display: grid; align-content: start; gap: 22px; }
.stack-form { display: grid; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 550; }
.field small { color: var(--crm-muted); line-height: 1.5; }
.field-error { color: #a22c39; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.notice p { margin-top: 5px; }
.notice .bi { font-size: 19px; }
.notice-info { color: #245271; background: #edf6fc; border-color: #d4e7f4; }
.notice-success { color: #17503b; background: #edf8f0; border-color: #cfe6d8; }
.notice-error { color: #872c38; background: #fff1f1; border-color: #eccbd0; }
.notice-warning { color: #80520d; background: #fff7e6; border-color: #eddfbf; }
.error-summary ul { margin: 9px 0 0; padding-left: 22px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; min-height: 210px; }
.empty-state h3 { margin: 17px 0 9px; font-size: 18px; }
.empty-state p { color: var(--crm-muted); max-width: 470px; font-size: 14px; }
.empty-icon { display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 14px; background: var(--crm-selected); color: var(--crm-green); font-size: 25px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--crm-muted); font-size: 13px; margin: 0 0 23px; }
.contact-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr); gap: 24px; align-items: start; }
.activity-editor { position: sticky; top: 20px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.detail-grid dt { color: var(--crm-muted); font-size: 12px; margin-bottom: 5px; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.task-item { padding: 20px 0; border-bottom: 1px solid var(--crm-line); }
.task-item:last-child { padding-bottom: 0; border-bottom: 0; }
.task-item .section-heading { margin-bottom: 9px; }
.activity-timeline { list-style: none; padding: 0; margin: 25px 0 0; }
.activity-timeline li { display: flex; gap: 15px; padding-bottom: 27px; }
.activity-timeline li:last-child { padding-bottom: 0; }
.activity-timeline h3 { font-size: 15px; }
.activity-timeline p { margin-top: 7px; font-size: 13px; }
.timeline-icon { flex: 0 0 33px; height: 33px; display: inline-flex; align-items: center; justify-content: center; background: var(--crm-sage); color: var(--crm-green); border-radius: 50%; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.next-step { color: var(--crm-green); }
.inset { margin: 0 24px 20px; }
.create-contact-option { border-top: 1px solid var(--crm-line); padding-top: 20px; margin-top: 24px; }
.create-contact-option p { margin-bottom: 13px; font-size: 13px; }
.contact-match-section { border-top: 1px solid var(--crm-line); padding-top: 20px; margin-top: 22px; }
.contact-match-section h3 { margin: 0 0 8px; }
.contact-match-search { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.contact-match-search > label { flex: 1 0 100%; font-weight: 650; }
.contact-match-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 9px; }
.contact-match-option { display: flex; align-items: start; gap: 12px; border: 1px solid var(--crm-line); border-radius: 9px; padding: 12px 14px; cursor: pointer; min-width: 0; }
.contact-match-option:has(input:checked) { border-color: var(--crm-green); background: var(--crm-selected); }
.contact-match-option:focus-within { outline: 2px solid var(--crm-green); outline-offset: 2px; }
.contact-match-option-content { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; flex: 1; }
.contact-match-option small { color: var(--crm-muted); font-size: 12px; }
.contact-match-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 7px; }
.contact-match-phone { display: grid; gap: 2px; min-width: 0; padding: 9px 11px; border: 1px solid var(--crm-line); border-radius: 7px; background: #fff; }
.contact-match-phone-label { color: var(--crm-muted); font-size: 11px; font-weight: 650; }
.contact-match-phone-value { font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact-match-digit-diff { padding: 1px 2px; border-radius: 3px; background: #ffe3a0; color: #573400; font-weight: 800; }
.contact-match-option .contact-match-difference-note { color: #754600; font-weight: 650; }
.contact-match-section.no-suggestions > .muted { color: var(--crm-ink); background: var(--crm-sage); border-left: 3px solid var(--crm-green); border-radius: 0 7px 7px 0; padding: 11px 13px; margin-top: 12px; }
tr.is-highlighted { background: #edf6f1; }
tr.is-muted { color: var(--crm-muted); }
.settings-layout { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.6fr); gap: 24px; margin-top: 24px; align-items: start; }
.settings-item { padding: 21px 0; border-top: 1px solid var(--crm-line); }
.settings-item p { margin-bottom: 13px; font-size: 14px; }
.settings-item > h3 { margin-bottom: 9px; }
.saved-filter-editor { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--crm-line); }
.saved-filter-editor > summary { color: var(--crm-green); font-weight: 550; }
.saved-filter-editor > summary .bi { margin-right: 9px; }
.saved-filter-editor > .field-hint { margin: 14px 0 20px; font-size: 13px; }
.settings-item .section-heading { margin-bottom: 10px; }
.guided-step { border-top: 1px solid var(--crm-line); padding-top: 16px; }
.guided-step legend { font-size: 16px; padding-right: 10px; }
.guided-step > p { margin-bottom: 14px; font-size: 13px; }
.guided-step > .field { margin-bottom: 17px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 13px; background: var(--crm-selected); color: var(--crm-green); border-radius: 50%; margin-right: 8px; }
.condition-builder { display: grid; gap: 12px; }
.condition-builder > .button { justify-self: start; }
.condition-row { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(0, 1.7fr) 32px; gap: 9px; padding-bottom: 12px; align-items: start; }
.condition-details { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.condition-range { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.condition-details > template { display: none; }
.condition-row label { font-size: 12px; }
.condition-row select, .condition-row input { font-size: 13px; padding: 9px; }
.condition-remove { margin-top: 23px; min-width: 30px; width: 30px; }
.permissions-fieldset { border: 1px solid var(--crm-line); border-radius: 7px; padding: 16px; }
.permissions-fieldset legend { padding: 0 7px; font-size: 14px; }
.permissions-fieldset .field-hint { margin: 4px 0 13px; font-size: 12px; }
.permission-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 14px; padding: 9px 0; }
.permission-row label { font-size: 14px; }
.team-login-link .text-link { display: inline-block; margin-top: 13px; }
.operator-space small { font-size: 13px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.narrow-panel { max-width: 600px; }
.module-settings { width: 100%; display: grid; gap: 20px; }
.settings-page-heading { margin-bottom: 18px; }
.settings-help-link { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 999px; color: #203d58; background: #edf5ff; font-weight: 650; font-size: 14px; }
.settings-help-link:hover { background: #dfeeff; }
.crm-settings-hero { min-height: 310px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(360px, 1.05fr) 180px minmax(420px, 1.15fr); align-items: center; gap: 26px; padding: 26px 30px; border-radius: 14px; color: #fff; isolation: isolate; box-shadow: 0 16px 40px rgba(16, 87, 73, .18); }
.crm-settings-hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.crm-settings-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 76, 65, .2); pointer-events: none; }
.crm-settings-hero-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.beta-badge { align-self: flex-start; padding: 5px 12px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(2, 77, 62, .38); font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.crm-settings-hero h2 { max-width: 510px; margin: 15px 0 8px; color: #fff; font-size: clamp(27px, 2.35vw, 39px); line-height: 1.06; letter-spacing: -1.2px; }
.crm-settings-hero-copy > p { max-width: 535px; margin: 0; color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.52; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px 16px; margin-top: 19px; }
.hero-primary-button { min-height: 46px; padding: 11px 24px; border: 1px solid rgba(255,255,255,.9); color: #fff; background: rgba(1, 65, 54, .7); box-shadow: 0 0 0 4px rgba(255,255,255,.1), 0 10px 28px rgba(0,48,41,.26); }
.hero-primary-button:hover { color: #fff; background: rgba(1, 55, 47, .86); transform: translateY(-1px); }
.hero-primary-button:disabled { opacity: .72; cursor: not-allowed; transform: none; }
.hero-beta-note { width: 100%; color: rgba(255,255,255,.76); font-size: 12px; }
.hero-shield { position: relative; display: grid; place-items: center; width: 136px; height: 136px; margin: auto; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; animation: crmShieldPulse 3.2s ease-in-out infinite; }
.hero-shield::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; }
.hero-shield > span { position: relative; display: grid; place-items: center; width: 86px; height: 86px; border-radius: 30px; color: #08745c; background: rgba(255,255,255,.92); box-shadow: 0 12px 30px rgba(0,71,61,.27); transform: rotate(45deg); }
.hero-shield .bi { font-size: 39px; transform: rotate(-45deg); }
@keyframes crmShieldPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.18); } 50% { box-shadow: 0 0 0 13px rgba(255,255,255,0); } }
.hero-steps { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; align-items: center; gap: 8px; text-align: center; }
.hero-steps-title { grid-column: 1 / -1; margin: 0 0 12px; text-align: left; color: #fff; font-size: 15px; font-weight: 700; }
.hero-step { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.hero-step-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #08745c; background: rgba(255,255,255,.94); box-shadow: 0 8px 25px rgba(0,65,55,.16); }
.hero-step-icon .bi { font-size: 25px; }
.hero-step strong { color: #fff; font-size: 14px; line-height: 1.25; }
.hero-step small { color: rgba(255,255,255,.78); font-size: 11px; line-height: 1.35; }
.hero-step-arrow { color: rgba(255,255,255,.88); font-size: 18px; }
.subscription-pill { position: absolute; top: 20px; right: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; color: #0a684f; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,67,57,.12); }
.subscription-pill > span { width: 9px; height: 9px; border-radius: 50%; background: #19bf70; box-shadow: 0 0 0 4px rgba(25,191,112,.13); }
.subscription-pill.is-inactive { color: #884625; }
.subscription-pill.is-inactive > span { background: #e57a3d; box-shadow: 0 0 0 4px rgba(229,122,61,.13); }
.settings-explainer-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 18px; }
.settings-card { min-width: 0; padding: 22px; border: 1px solid var(--crm-line); border-radius: 12px; background: #fff; box-shadow: 0 5px 20px rgba(27,56,65,.035); }
.settings-card > h2, .settings-card-title h2 { margin: 0; font-size: 20px; }
.settings-card > p, .settings-card-title + p { margin: 6px 0 18px; color: var(--crm-muted); font-size: 13px; line-height: 1.5; }
.settings-card-title { display: flex; align-items: center; gap: 8px; }
.context-help { position: relative; color: #486176; cursor: help; }
.context-help > span { position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 10px); width: 235px; padding: 10px 12px; border-radius: 8px; color: #fff; background: #203a50; box-shadow: 0 10px 30px rgba(20,41,55,.22); font-size: 12px; line-height: 1.4; transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.context-help:hover > span, .context-help:focus > span { opacity: 1; transform: translateX(-50%) translateY(0); }
.history-options { display: grid; gap: 10px; }
.history-option { display: grid; grid-template-columns: 24px minmax(0,1fr) minmax(120px,180px); gap: 13px; align-items: center; min-height: 79px; padding: 13px 15px; border: 1px solid #dce5e7; border-radius: 9px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.history-option:hover { border-color: #83c3b1; transform: translateY(-1px); }
.history-option:has(input:checked) { border-color: #5cb89f; background: #f1fbf7; box-shadow: inset 0 0 0 1px rgba(37,145,113,.05); }
.history-option input { position: absolute; opacity: 0; pointer-events: none; }
.history-option-control { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #9fb0b7; border-radius: 50%; background: #fff; }
.history-option:has(input:checked) .history-option-control { border: 6px solid #21876c; }
.history-option-copy { min-width: 0; }
.history-option-copy strong { font-size: 15px; }
.history-option-copy em { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; color: #fff; background: #35b97d; font-size: 10px; font-style: normal; font-weight: 700; }
.history-option-copy small, .history-option-side { display: block; color: var(--crm-muted); font-size: 12px; line-height: 1.35; }
.history-option-copy small { margin-top: 5px; }
.history-option-side { text-align: right; }
.history-options:disabled .history-option { cursor: default; opacity: .78; }
.history-activation-form { display: grid; gap: 0; }
.history-activation-actions { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--crm-line); }
.history-activation-button { padding-inline: 22px; font-weight: 650; }
.subscription-required-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 12px; border-radius: 8px; color: #7a482d; background: #fff4eb; font-size: 13px; }
.settings-benefits > p { margin-bottom: 5px; }
.benefit-row { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf1f2; }
.benefit-row:last-child { border-bottom: 0; padding-bottom: 0; }
.benefit-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; }
.benefit-icon .bi { font-size: 22px; }
.benefit-icon.tone-blue { color: #1475e8; background: #e7f2ff; }
.benefit-icon.tone-green { color: #149b63; background: #e6faef; }
.benefit-icon.tone-purple { color: #7b3bd4; background: #f0e9ff; }
.benefit-row strong, .benefit-row small { display: block; }
.benefit-row strong { font-size: 14px; }
.benefit-row small { margin-top: 3px; color: var(--crm-muted); font-size: 12px; line-height: 1.4; }
.history-progress-panel { padding: 20px 22px 15px; border: 1px solid #dcecef; border-radius: 13px; background: #f4fbfc; }
.history-progress-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.history-progress-heading h2 { margin: 0; font-size: 21px; }
.history-progress-heading p { margin: 5px 0 0; color: var(--crm-muted); font-size: 13px; }
.history-progress-heading .text-link { white-space: nowrap; }
.history-timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 23px 0 16px; }
.history-timeline::before { content: ""; position: absolute; top: 10px; left: 12.5%; right: 12.5%; height: 1px; background: #b9cfd3; }
.timeline-step { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; }
.timeline-step > span { display: grid; place-items: center; width: 21px; height: 21px; margin-bottom: 8px; border: 1.5px solid #9ab0b7; border-radius: 50%; background: #fff; color: #fff; }
.timeline-step.is-current > span { border-color: #12a968; background: #12a968; box-shadow: 0 0 0 6px rgba(18,169,104,.12); animation: crmTimelinePulse 2.2s ease-in-out infinite; }
.timeline-step.is-complete > span { border-color: #158c69; background: #158c69; }
.timeline-step strong { max-width: 180px; color: #395066; font-size: 12px; line-height: 1.25; }
.timeline-step.is-current strong, .timeline-step.is-complete strong { color: #167256; }
.timeline-step small { max-width: 180px; margin-top: 3px; color: #718291; font-size: 11px; line-height: 1.35; }
@keyframes crmTimelinePulse { 0%,100% { box-shadow: 0 0 0 5px rgba(18,169,104,.1); } 50% { box-shadow: 0 0 0 9px rgba(18,169,104,0); } }
.history-sources { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: rgba(255,255,255,.7); color: var(--crm-muted); font-size: 12px; }
.history-sources strong { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid #d2e0e3; border-radius: 999px; color: #294250; background: #fff; font-weight: 650; }
.history-sources strong .bi { color: #167b63; }
.history-sources .button { margin-left: auto; }
.backfill-job-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.backfill-job { padding: 15px; border: 1px solid #dbe7e9; border-radius: 9px; background: #fff; }
.backfill-job h3 { font-size: 14px; }
.backfill-job p { margin: 7px 0; font-size: 12px; }
.backfill-empty-state { margin: 13px 0 0; color: var(--crm-muted); font-size: 13px; }
.module-disable-form { display: flex; justify-content: flex-end; }
.sidebar-logout { margin-top: 18px; }
.sidebar-logout .button { width: 100%; }
.login-module-activation { display: grid; gap: 14px; margin-top: 36px; }
.help-content { max-width: 940px; }
.help-content > .panel { margin-bottom: 23px; }
.help-steps { padding-left: 25px; }
.help-steps li { margin: 22px 0; padding-left: 8px; }
.help-steps p { color: var(--crm-muted); margin-top: 6px; }
.faq-item { border-top: 1px solid var(--crm-line); padding: 18px 0; }
.faq-item > summary { font-weight: 550; }
.faq-item p { margin-top: 13px; color: var(--crm-muted); }
.password-input { position: relative; display: flex; }
.password-input input { padding-right: 50px; }
.password-input > .icon-button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.crm-guest .guest-main > .notice { margin: 16px; }
.crm-guest .help-content { margin: 65px auto; padding: 0 24px; }
.confirm-dialog { border: 1px solid var(--crm-line); border-radius: 12px; padding: 24px; max-width: 460px; width: calc(100% - 32px); color: var(--crm-ink); box-shadow: 0 20px 80px #1029222e; }
.confirm-dialog::backdrop { background: #122d2666; }
.confirm-dialog p { color: var(--crm-muted); }
.drawer-open, .drawer-close, .drawer-backdrop { display: none; }
form[aria-busy="true"] button[type="submit"] { pointer-events: none; opacity: .65; }
.crm-workspace { background: #f8f9ff; }
.crm-workspace .sidebar { color: #f7fbff; border-right: 0; background: radial-gradient(circle at -15% 110%, #087bbc 0, transparent 28%), linear-gradient(165deg, #09276d 0%, #0d338c 58%, #0a2d7e 100%); }
.crm-workspace .wordmark strong, .crm-workspace .wordmark span { color: #fff; }
.crm-workspace .account-switch { color: #fff; background: #ffffff14; border-color: #9bc2ff55; border-radius: 11px; }
.crm-workspace .account-switch select { color: #fff; }
.crm-workspace .account-switch select option { color: #172640; background: #fff; }
.crm-workspace .account-switch .icon-button, .crm-workspace .sidebar .icon-button { color: #e5f4ff; }
.crm-workspace .sidebar .icon-button:hover { color: #fff; background: #ffffff22; }
.crm-workspace .primary-nav > a, .crm-workspace .help-link { color: #edf6ff; border-radius: 11px; }
.crm-workspace .primary-nav > a:hover, .crm-workspace .help-link:hover { color: #fff; background: #ffffff20; }
.crm-workspace .primary-nav > a[aria-current="page"], .crm-workspace .help-link[aria-current="page"] { color: #052957; background: linear-gradient(105deg, #16ddb5, #2bc6eb); box-shadow: 0 7px 18px #03194932; }
.crm-workspace .count-badge { color: #fff; background: #476dda; }
.crm-workspace .nav-heading { color: #c5d8fa; border-color: #a9c6fd37; }
.crm-workspace .help-link { border-color: #a9c6fd37; }
.crm-workspace .identity { color: #fff; }
.crm-workspace .identity small { color: #d3e0fb; }
.crm-workspace .sidebar-bottom .avatar { color: #07337d; background: #d5f8ff; }
.crm-workspace .sidebar :focus-visible { outline-color: #d8ff70; }
.crm-workspace .topbar { background: #fff; border-bottom: 1px solid #e8ebf6; }
.topbar-search { display: flex; align-items: center; gap: 5px; width: clamp(210px, 27vw, 340px); min-height: 40px; border: 1px solid var(--crm-input-line); border-radius: 9px; padding-left: 12px; color: var(--crm-muted); background: #fff; }
.topbar-search > .bi { font-size: 18px; }
.topbar-search input { min-height: 38px; padding: 7px 4px; border: 0; background: transparent; font-size: 13px; }
.topbar-search .icon-button { min-width: 34px; width: 34px; min-height: 34px; padding: 6px; }
.topbar-search:focus-within { border-color: #2d76c4; box-shadow: 0 0 0 3px #2d76c422; }
.topbar-search input:focus-visible { outline: none; }
.crm-workspace .main-content { background: #f8f9ff; }
@media (min-width: 1600px) {
  .main-content, .topbar { padding-right: 45px; padding-left: 45px; }
  .workspace-footer { margin-inline: 45px; }
}
@media (max-width: 1250px) {
  :root { --crm-sidebar: 240px; }
  .sidebar-brand { padding-inline: 9px; }
  .wordmark { font-size: 25px; }
  .account-switch, .sidebar-search { margin-inline: 6px; }
  .main-content { padding-inline: 24px; }
  .topbar { padding-inline: 24px; }
  .workspace-footer { margin-inline: 24px; }
  .kpi-card { padding-inline: 18px; gap: 14px; }
  .kpi-icon { flex-basis: 51px; width: 51px; height: 56px; font-size: 25px; }
  .kpi-strip { grid-template-columns: repeat(auto-fit, minmax(min(225px, 100%), 1fr)); }
  .contacts-table th, .contacts-table td { padding-inline: 10px; }
  .contact-cell { gap: 9px; }
  .contacts-table .avatar { display: none; }
  .contact-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .settings-layout { grid-template-columns: minmax(230px, .75fr) minmax(0, 1.4fr); gap: 18px; }
  .condition-row { grid-template-columns: 1fr 30px; }
  .condition-row > .field { grid-column: 1; }
  .condition-details { grid-column: 1; }
  .condition-remove { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1000px) {
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .contact-layout { grid-template-columns: 1fr; }
  .activity-editor { position: static; grid-row: 1; }
  .settings-layout { grid-template-columns: 1fr; }
  .condition-row { grid-template-columns: minmax(125px, 1fr) minmax(0, 1.7fr) 32px; }
  .condition-details { grid-column: 2; }
  .condition-remove { grid-column: 3; }
}
@media (max-width: 1280px) {
  .crm-settings-hero { grid-template-columns: minmax(0,1fr) 150px; }
  .hero-steps { grid-column: 1 / -1; }
  .hero-steps-title { text-align: center; }
  .settings-explainer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--crm-line); padding: 16px; }
  .sidebar-brand { padding: 0 9px 18px; }
  .sidebar-bottom { margin-top: 20px; }
  .workspace { margin-left: 0; }
  .crm.js-enabled .sidebar { position: fixed; width: min(320px, 88vw); transform: translateX(-105%); transition: transform .2s ease; border-right: 1px solid var(--crm-line); }
  .crm.js-enabled .sidebar.is-open { transform: translateX(0); }
  .crm-workspace .topbar-search { width: min(330px, 40vw); }
  .crm.js-enabled .drawer-open, .crm.js-enabled .drawer-close { display: inline-flex; }
  .drawer-backdrop { display: block; position: fixed; z-index: 29; inset: 0; width: 100%; height: 100%; border: 0; background: #122d2666; }
  body.drawer-is-open { overflow: hidden; }
  .main-content { padding-top: 14px; }
  .kpi-strip { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
  .crm-settings-hero { min-height: 0; }
}
@media (max-width: 760px) {
  .contact-match-phones { grid-template-columns: 1fr; }
  .main-content { padding-inline: 18px; }
  .topbar { padding-inline: 14px; gap: 8px; flex-wrap: wrap; }
  .crm-workspace .topbar-search { width: 100%; flex: 1 1 auto; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .topbar-actions { gap: 10px; }
  .topbar-actions > .button { font-size: 12px; padding: 8px; }
  .breadcrumb { font-size: 12px; gap: 7px; }
  .breadcrumb > a, .breadcrumb > a + span { display: none; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  h2 { font-size: 21px; }
  .page-heading p { font-size: 15px; }
  .page-heading .button-primary { width: 100%; padding: 12px 18px; }
  .kpi-strip { grid-template-columns: 1fr; padding: 0 20px; }
  .kpi-card { border-right: 0; border-bottom: 1px solid var(--crm-line); padding: 18px 0; }
  .kpi-card:last-child { border-bottom: 0; }
  .kpi-card > div { display: grid; grid-template-columns: 1fr auto; width: 100%; gap: 3px 15px; }
  .kpi-title { align-self: center; }
  .kpi-value { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .kpi-meta { grid-column: 1; }
  .below-cards { margin-bottom: 18px; }
  .panel-heading, .panel-body { padding: 20px 18px; }
  .filters { padding-inline: 17px; }
  .filter-select { flex: 1 1 calc(50% - 10px); max-width: none; }
  .search-input { flex-basis: 100%; }
  .filter-toolbar > .button { flex: 1; }
  .contacts-table, .contacts-table tbody, .contacts-table tr, .contacts-table td, .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; }
  .contacts-table thead, .responsive-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .contacts-table tr, .responsive-table tr { padding: 17px; border-top: 1px solid var(--crm-line); }
  .contacts-table td, .responsive-table td { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(0, 1fr); gap: 5px 14px; border: 0; padding: 7px 0; }
  .contacts-table td::before, .responsive-table td::before { content: attr(data-label); font-size: 12px; color: var(--crm-muted); }
  .contacts-table td:first-child { display: block; padding: 0 0 13px; }
  .contacts-table td:first-child::before { display: none; }
  .contacts-table .avatar { display: inline-flex; }
  .contact-name { font-size: 16px; }
  .contacts-table td > .cell-secondary, .responsive-table td > .cell-secondary { grid-column: 2; margin: 0; }
  .contacts-table td > .badge { justify-self: start; }
  .contacts-table .row-action { display: none; }
  .phone-cell { white-space: normal; }
  .pagination-bar { align-items: flex-start; flex-direction: column; }
  .workspace-footer { align-items: flex-start; flex-direction: column; margin-inline: 18px; gap: 10px; }
  .workspace-footer > span:first-child { flex-wrap: wrap; }
  .contact-layout, .settings-layout { gap: 18px; }
  .condition-row { grid-template-columns: 1fr 30px; }
  .condition-details { grid-column: 1; grid-template-columns: 1fr; }
  .condition-range { grid-template-columns: 1fr; }
  .condition-remove { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { gap: 17px; }
  .identity strong { font-size: 14px; }
  .permission-row { grid-template-columns: 1fr; gap: 7px; }
  .settings-help-link { align-self: flex-start; }
  .crm-settings-hero { display: block; padding: 24px 20px; }
  .crm-settings-hero-copy { padding-top: 24px; }
  .crm-settings-hero h2 { font-size: 29px; }
  .subscription-pill { top: 18px; right: 18px; }
  .hero-shield { width: 112px; height: 112px; margin: 24px auto; }
  .hero-shield > span { width: 70px; height: 70px; }
  .hero-steps { grid-template-columns: 1fr; gap: 12px; text-align: left; }
  .hero-steps-title { text-align: left; }
  .hero-step { grid-template-columns: 48px 1fr; justify-items: start; text-align: left; }
  .hero-step-icon { grid-row: 1 / span 2; width: 48px; height: 48px; }
  .hero-step-arrow { display: none; }
  .history-option { grid-template-columns: 24px minmax(0,1fr); }
  .history-option-side { grid-column: 2; text-align: left; }
  .history-activation-button { width: 100%; }
  .history-progress-heading { display: block; }
  .history-progress-heading .text-link { display: inline-flex; margin-top: 9px; }
  .history-timeline { grid-template-columns: 1fr; gap: 15px; }
  .history-timeline::before { top: 10px; bottom: 10px; left: 10px; right: auto; width: 1px; height: auto; }
  .timeline-step { grid-template-columns: 25px minmax(0,1fr); justify-items: start; text-align: left; column-gap: 10px; }
  .timeline-step > span { grid-row: 1 / span 2; }
  .timeline-step strong, .timeline-step small { max-width: none; }
  .history-sources { flex-wrap: wrap; }
  .history-sources .button { width: 100%; margin-left: 0; }
  .backfill-job-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .topbar-actions > .button .bi { display: none; }
  .filter-select { flex-basis: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-heading { gap: 12px; }
  .contact-heading .avatar-large { flex-basis: 46px; width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .filters, .workspace-footer, .activity-editor, .inline-actions, .form-actions, .back-link { display: none !important; }
  .workspace { margin: 0; }
  .main-content { padding: 0; }
  .contact-layout { display: block; }
  .panel { break-inside: avoid; margin-bottom: 18px; }
}
.sms-balance-number{font-size:clamp(2.25rem,5vw,3.5rem);font-weight:750;line-height:1;margin:.75rem 0}.sms-balance-number+p{color:var(--muted,#526074)}
