/* CRM customer directory, dossier and reports. All rules are opt-in and module scoped. */
#page-crm .crm-contact-cards,.crm-customer-record .crm-customer-deals{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:14px;align-items:start;
}
#page-crm .crm-contact-card,.crm-customer-record .crm-customer-deal{
  min-width:0;background:#fff;border:1px solid #d5deec;border-radius:14px;overflow:hidden;
  box-shadow:0 3px 12px #18325806;transition:border-color .15s,box-shadow .15s;
}
#page-crm .crm-contact-card:focus-within,#page-crm .crm-contact-card:hover,.crm-customer-record .crm-customer-deal:hover{
  border-color:#7a94cc;box-shadow:0 5px 16px #244c9810;
}
.crm-contact-open.crm-record-link,.crm-contact-count.crm-record-link,.crm-customer-deal-open.crm-record-link,.crm-unified-result.crm-record-link{
  font:inherit;cursor:pointer;appearance:none;border:0;background:transparent;color:#19324e;text-align:start;
}
#page-crm .crm-contact-open.crm-record-link{padding:16px 14px 10px!important;border-radius:0!important;line-height:inherit;color:#19324e!important}
#page-crm .crm-contact-count.crm-record-link{padding:4px 7px!important;border-radius:7px!important;line-height:inherit;color:#3152a6!important}
.crm-customer-record .crm-customer-deal-open.crm-record-link{display:flex;padding:14px!important;border-radius:0!important;line-height:inherit;color:#19324e!important}
#page-crm .crm-unified-result.crm-record-link{display:flex;padding:10px 8px!important;border-radius:8px!important;line-height:inherit;color:#19324e!important}
#page-crm .crm-unified-result.crm-record-link:hover,#page-crm .crm-unified-result.crm-record-link:focus-visible{background:#edf2ff!important}
.crm-customer-record .crm-unified-result.crm-record-link{display:flex;padding:10px 8px!important;border-radius:8px!important;line-height:inherit;color:#19324e!important}
.crm-customer-record .crm-unified-result.crm-record-link:hover,.crm-customer-record .crm-unified-result.crm-record-link:focus-visible{background:#edf2ff!important}
.crm-contact-open:focus-visible,.crm-contact-count:focus-visible,.crm-customer-deal-open:focus-visible,.crm-unified-result:focus-visible{
  outline:3px solid #305ac5;outline-offset:-3px;border-radius:8px;
}
#page-crm .crm-contact-open{display:flex;align-items:center;width:100%;gap:12px;padding:16px 14px 10px;min-height:70px}
.crm-contact-avatar{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:13px;background:#edf2ff;color:#3152a6}
.crm-contact-avatar svg{width:23px;height:23px}
.crm-contact-title{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.crm-contact-title b{font-size:15px;line-height:1.65;font-weight:700;overflow-wrap:anywhere}
.crm-contact-title small{font-size:12px;line-height:1.6;color:#526780;overflow-wrap:anywhere}
.crm-contact-open>svg{width:17px;height:17px;flex:none;color:#506785}
#page-crm .crm-contact-phone{display:flex;align-items:center;gap:8px;min-height:38px;padding:0 16px 10px;color:#435c77;font-size:13px}
.crm-contact-phone svg{width:16px;height:16px;color:#3152a6;flex:none}
.crm-contact-phone a{color:#294fa6;text-decoration:none;font-size:14px;font-weight:600}
#page-crm .crm-contact-card>footer,.crm-customer-deal>footer{
  display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:8px 14px;background:#f5f7fc;border-top:1px solid #e4e9f3;
}
.crm-contact-owner{display:flex;align-items:center;flex:none}
.crm-contact-count{display:flex;align-items:center;gap:6px;font-size:12px;min-height:32px;border-radius:7px;padding:4px 7px;color:#3152a6}
.crm-contact-count svg{width:16px;height:16px;flex:none}.crm-contact-count b{font-size:14px}
.crm-customer-toolbar,.crm-customer-filters{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-block:0 14px}
.crm-customer-segments{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.crm-customer-segments>button{min-height:38px!important;gap:7px!important}
.crm-customer-segments>button[aria-pressed=true]{background:#eaf0ff!important;border-color:#8ca6df!important;color:#254b9c!important;box-shadow:inset 0 -2px #315ac6}
.crm-customer-search{display:flex;align-items:center;gap:8px;position:relative;flex:1 1 240px;max-width:420px;min-width:190px;color:#48617b}
.crm-customer-search>svg{width:18px;height:18px;position:absolute;inset-inline-start:11px;pointer-events:none;z-index:1}
.crm-customer-search>input{font:inherit;width:100%;min-width:0;height:40px;border:1px solid #a9bad1;border-radius:9px;background:#fff;color:#19324e;padding:7px 36px 7px 11px;direction:rtl;text-align:start}
.crm-customer-search>input:focus{outline:2px solid #849ee7;outline-offset:1px;border-color:#315ac6}
.crm-customer-pagination{display:flex;justify-content:center;align-items:center;gap:14px;margin-block:16px 4px;min-height:40px}
.crm-customer-pagination output{font-size:12px;color:#526780}
.crm-customer-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:22px 14px;grid-column:1/-1;color:#526780}
.crm-customer-empty>svg{width:25px;height:25px;flex:none;color:#6c7b9b}.crm-customer-empty p{margin:0;line-height:1.8}
.crm-customer-record{width:100%;max-width:none;min-width:0;display:flex;flex-direction:column;gap:16px}
.crm-customer-record>header{margin:0!important;padding:12px 14px!important;display:flex;gap:12px;align-items:center;justify-content:space-between}
.crm-customer-record>header h3{display:flex;align-items:center;gap:9px;margin:0;min-width:0;font-size:18px;font-weight:700;line-height:1.65}
.crm-customer-record>header h3>svg{width:23px;height:23px;flex:none;color:#315ac6}
.crm-customer-header-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:none}
.crm-customer-identity{display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:0 14px;min-width:0}
.crm-customer-identity>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.crm-customer-identity b{font-size:16px;font-weight:700}.crm-customer-identity small{font-size:12px;color:#526780}
.crm-customer-inline,.crm-customer-address{display:flex;align-items:center;gap:7px;font-size:13px;color:#435a74}
.crm-customer-inline>svg,.crm-customer-address>svg{width:17px;height:17px;flex:none;color:#3152a6}
.crm-customer-address{flex:1 1 220px;max-width:420px;line-height:1.7;overflow-wrap:anywhere}
.crm-customer-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.crm-customer-metrics>div{display:flex;flex-direction:column;gap:7px;min-width:0;padding:13px 14px;border:1px solid #d5deec;border-radius:12px;background:#fff;border-top:3px solid #5873ba}
.crm-customer-metrics>div[data-metric=wonAmount]{border-top-color:#4561bb;background:#f1f4ff}
.crm-customer-metrics>div[data-metric=approvedPaid]{border-top-color:#8052ae;background:#f8f2ff}
.crm-customer-metrics>div[data-metric=remaining]{border-top-color:#ad741b;background:#fff8ec}
.crm-customer-metrics>div>span{display:flex;align-items:center;gap:7px;font-size:12px;color:#435974}
.crm-customer-metrics>div>span svg{width:18px;height:18px;color:#3c5487;flex:none}
.crm-customer-metrics>div>b{font-size:18px;line-height:1.65;color:#19324e;overflow-wrap:anywhere}
.crm-customer-metrics>div>small{font-size:11px;color:#526780;line-height:1.5}
.crm-customer-filters{margin:0;padding:12px 14px;background:#f4f6fb;border:1px solid #dbe3ef;border-radius:10px;align-items:end}
.crm-customer-filters .day-field{margin:0;flex:0 1 auto}.crm-customer-filters .day-field-short{min-width:140px;max-width:190px}
.crm-customer-filters .crm-customer-search{align-self:end}
.crm-customer-deal-open{display:flex;flex-direction:column;gap:10px;min-width:0;width:100%;padding:14px}
.crm-customer-deal-title{display:flex;align-items:flex-start;gap:8px;width:100%;min-width:0}
.crm-customer-deal-title>b{flex:1;min-width:0;font-size:14px;line-height:1.75;overflow-wrap:anywhere}
.crm-customer-deal-title>svg{width:18px;height:18px;flex:none;margin-top:3px;color:#3152a6}
.crm-customer-deal-value{font-size:17px;font-weight:700;line-height:1.7;color:#234a9d}
.crm-customer-stage{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:12px;color:#435974}
.crm-customer-status{display:inline-flex;align-items:center;gap:5px;background:#eaf0ff;border-radius:6px;padding:4px 7px;color:#2e4f96}
.crm-customer-status>svg{width:14px;height:14px;flex:none}
.crm-customer-deal[data-outcome=pending]{border-inline-start:3px solid #c38a20}.crm-customer-deal[data-outcome=pending] .crm-customer-status{background:#fff1cc;color:#7e5516}
.crm-customer-deal[data-outcome=lost]{border-inline-start:3px solid #c34b63}.crm-customer-deal[data-outcome=lost] .crm-customer-status{background:#fcecf0;color:#a22c47}
.crm-customer-deal[data-outcome=won]{border-inline-start:3px solid #7861b7}.crm-customer-deal[data-outcome=won] .crm-customer-status{background:#f2edff;color:#65439e}
.crm-customer-deal[data-outcome=archived] .crm-customer-status{background:#eceef3;color:#535d70}
.crm-customer-assignee{display:flex;align-items:flex-start;gap:6px;font-size:12px;color:#52617a;line-height:1.7;overflow-wrap:anywhere}
.crm-customer-assignee svg{width:15px;height:15px;flex:none}
.crm-customer-deal-dates{display:flex;flex-direction:column;gap:5px;color:#526780}
.crm-customer-deal-dates>small{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.65}.crm-customer-deal-dates svg{width:14px;height:14px;flex:none}
.crm-customer-loss{font-size:12px;line-height:1.65;color:#9f334b}.crm-customer-deal>footer>small{font-size:11px;color:#526780}
.crm-customer-documents{display:flex;flex-direction:column;gap:10px}
.crm-customer-document{display:flex;align-items:center;flex-wrap:wrap;gap:12px;min-width:0;padding:13px 14px;background:#fff;border:1px solid #dbe3ef;border-radius:11px}
.crm-customer-document>svg{width:24px;height:24px;color:#3152a6;flex:none}
.crm-customer-document>div{display:flex;flex-direction:column;gap:5px;flex:1;min-width:180px}
.crm-customer-document b{font-size:14px;line-height:1.7}.crm-customer-document small{font-size:12px;line-height:1.7;color:#526780;white-space:pre-wrap;overflow-wrap:anywhere}
.crm-customer-document>strong{font-size:15px;color:#294fa6}.crm-customer-document[data-activity-status=overdue]{border-inline-start:3px solid #c08620}
.crm-unified-search{position:relative;min-width:220px;max-width:420px;flex:1}
.crm-unified-search .crm-customer-search{max-width:none}.crm-unified-results{position:absolute;inset-inline-end:0;top:calc(100% + 6px);width:min(520px,80vw);max-height:min(560px,70vh);overflow:auto;z-index:110;background:#fff;border:1px solid #bcc9df;border-radius:12px;box-shadow:0 12px 36px #17315624;padding:8px}
.crm-unified-results[hidden]{display:none}.crm-unified-results h4{display:flex;align-items:center;gap:7px;margin:0;padding:7px 9px;color:#3b5384;font-size:12px;background:#f1f4fb;border-radius:7px}
.crm-unified-results h4 svg{width:16px;height:16px}.crm-unified-results>p{font-size:13px;line-height:1.8;margin:8px;color:#526780}
.crm-unified-result{display:flex;align-items:center;gap:10px;padding:10px 8px;min-width:0;width:100%;border-radius:8px}
.crm-unified-result:hover,.crm-unified-result:focus-visible{background:#edf2ff}.crm-unified-result>span:first-child{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.crm-unified-result b{font-size:13px;line-height:1.7;overflow-wrap:anywhere}.crm-unified-result small{font-size:11px;color:#526780;line-height:1.7}.crm-unified-result>svg{width:16px;height:16px;flex:none}
/* The pipeline has one search and two compact working rows, without KPI cards. */
#page-crm [data-crm-unified][hidden]{display:none!important}
#page-crm.crm-pipeline-view .crm-head{
  display:grid;grid-template-columns:auto minmax(180px,1fr) auto;
  grid-template-areas:"heading search actions" "tools tools tools";
  gap:8px 12px;align-items:center;padding-block:8px;
}
#page-crm.crm-pipeline-view .crm-heading{grid-area:heading;min-width:0}
#page-crm.crm-pipeline-view .crm-head>[data-crm-unified]{grid-area:search;min-width:0;max-width:320px;justify-self:start;width:100%}
#page-crm.crm-pipeline-view .crm-head>.module-head-actions{grid-area:actions;display:flex;flex-wrap:nowrap;gap:6px;min-width:0}
#page-crm.crm-pipeline-view .crm-head>[data-crm-tools]{grid-area:tools;min-width:0;display:flex;justify-content:flex-start}
#page-crm.crm-pipeline-view .crm-head .crm-workbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;width:100%;padding:0;margin:0;border:0}
#page-crm.crm-pipeline-view .crm-workbar .day-select{flex:0 1 auto;width:145px}
#page-crm.crm-pipeline-view .crm-workbar select[data-outcome-filter],#page-crm.crm-pipeline-view .crm-workbar .day-select:has([data-outcome-filter]){width:185px}
#page-crm.crm-pipeline-view .crm-workbar .crm-due-filter{flex:none}
#page-crm.crm-pipeline-view .crm-head .crm-customer-search{min-width:0;max-width:none}
#page-crm.crm-pipeline-view .crm-head [data-crm-unified] .crm-unified-search{min-width:0;max-width:none}
#page-crm.crm-pipeline-view [data-crm-body]{padding-block-start:10px}
@media(max-width:720px){
  #page-crm.crm-pipeline-view .crm-head{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"heading actions" "search search" "tools tools"}
  #page-crm.crm-pipeline-view .crm-head>[data-crm-unified]{max-width:none}
  #page-crm.crm-pipeline-view .crm-head .module-head-actions [data-crm-review-open]>span{display:none}
  #page-crm.crm-pipeline-view .crm-workbar .day-select{flex:1 1 130px;max-width:185px}
}
.crm-customer-reports-nav{display:flex;align-items:center;gap:8px;margin-block-end:14px}
.crm-customer-report-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-block-end:16px;padding:12px 14px;border-radius:12px;background:#f3f6fc;border:1px solid #dae3f1}
.crm-customer-report-filters .day-field{min-width:150px;max-width:220px;margin:0}.crm-customer-report-filters .crm-customer-search{max-width:300px}
.crm-customer-report-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.crm-customer-sales-report .crm-customer-metrics{margin-block-end:14px}
.crm-customer-comparison{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;margin-block:12px 18px;color:#435974}
.crm-customer-comparison>svg{width:22px;height:22px;color:#65439e}.crm-customer-comparison b{color:#19324e;font-size:15px}
.crm-customer-report-table{margin-block:18px}.crm-customer-report-table h3{display:flex;align-items:center;gap:8px;font-size:15px;margin:0;line-height:1.7}
.crm-customer-report-table h3>svg{width:20px;height:20px;color:#3152a6}.crm-customer-report-table .day-section-head{padding-inline:14px}
.crm-customer-report-table th{text-align:center;white-space:nowrap}.crm-customer-report-table td{text-align:center;white-space:nowrap}
.crm-customer-report-table td.table-description{text-align:right;white-space:normal;min-width:180px}
.crm-customer-report-table .crm-record-link{display:flex;align-items:center;gap:7px;text-align:start}.crm-customer-report-table .crm-record-link span{display:flex;flex-direction:column;gap:4px}.crm-customer-report-table .crm-record-link small{font-size:11px;color:#526780}
.crm-customer-report-note{font-size:12px;line-height:1.9;color:#526780;margin-block:12px}
.crm-customer-record [data-customer-message][data-kind=error],.crm-customer-sales-report [data-kind=error],.crm-customer-directory [data-kind=error]{display:flex;align-items:center;gap:8px;color:#a32442;background:#fff0f3;border:1px solid #ebadbc;padding:10px 12px;border-radius:8px}
.crm-customer-record [data-customer-message][hidden],.crm-customer-sales-report [data-report-message][hidden],.crm-customer-directory [data-customer-message][hidden]{display:none!important}
[data-customer-message]>svg,[data-report-message]>svg{width:20px;height:20px;flex:none}
@media(max-width:850px){
  .crm-customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-customer-record>header{align-items:flex-start;flex-wrap:wrap}
  .crm-customer-header-actions{flex-wrap:wrap}.crm-customer-identity{padding-inline:12px}.crm-customer-record{gap:12px}
}
@media(max-width:520px){
  #page-crm .crm-contact-cards,.crm-customer-record .crm-customer-deals{grid-template-columns:minmax(0,1fr);gap:12px}
  .crm-customer-search{min-width:0;flex-basis:100%;max-width:none}.crm-unified-search{min-width:0;max-width:none;flex-basis:100%}
  .crm-customer-segments{gap:6px}.crm-customer-segments>button{min-height:44px!important;font-size:12px!important;padding:7px 10px!important}
  .crm-customer-metrics{gap:8px}.crm-customer-metrics>div{padding:10px}.crm-customer-metrics>div>b{font-size:15px}.crm-customer-metrics>div>span{font-size:11px}
  .crm-customer-filters .day-field,.crm-customer-report-filters .day-field{min-width:0;max-width:none;flex:1 1 calc(50% - 12px)}
  .crm-customer-filters .day-date-field,.crm-customer-report-filters .day-date-field{min-width:0}
  .crm-customer-header-actions>button{min-height:44px!important}.crm-customer-record>header h3{font-size:16px}
  .crm-customer-document{gap:9px;padding:11px}.crm-customer-document>div{min-width:140px}
  .crm-customer-report-actions{width:100%}.crm-customer-pagination{gap:9px}.crm-customer-pagination button{min-height:44px!important}
}
@media(prefers-reduced-motion:reduce){#page-crm .crm-contact-card,.crm-customer-record .crm-customer-deal{transition:none}}

/* The whole deal card conveys its outcome; child text remains fully opaque. */
.crm-customer-record .crm-customer-deal.day-status-surface,#page-crm .crm-deal-card.day-status-surface{
 background:var(--day-status-wash)!important;border-color:var(--day-status-edge)!important;border-inline-start:3px solid var(--day-status-color);color:var(--day-status-ink)!important;
 box-shadow:0 3px 12px rgba(var(--day-status-rgb),.06);
}
.crm-customer-record .crm-customer-deal.day-status-surface:hover,#page-crm .crm-deal-card.day-status-surface:hover{box-shadow:0 5px 18px rgba(var(--day-status-rgb),.15)}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-open.crm-record-link{background:transparent!important;color:var(--day-status-ink)!important}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-value,.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-title>svg{color:var(--day-status-ink)}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-status{background:rgba(var(--day-status-rgb),.13);color:var(--day-status-ink)}
.crm-customer-record .crm-customer-deal.day-status-surface>footer{background:rgba(var(--day-status-rgb),.06);border-color:rgba(var(--day-status-rgb),.18)}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-stage,.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-dates,.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-dates>small{color:var(--day-status-ink)}
.crm-customer-record .crm-customer-metrics>div.day-status-surface{background:var(--day-status-wash);border-color:var(--day-status-edge);border-top-color:var(--day-status-color)}
.crm-customer-record .crm-customer-metrics>div.day-status-surface>b,.crm-customer-record .crm-customer-metrics>div.day-status-surface svg{color:var(--day-status-ink)}
#page-crm .crm-deal-card.day-status-surface>b,#page-crm .crm-deal-card.day-status-surface .crm-card-value{color:var(--day-status-ink)!important}
#page-crm .crm-card-status{width:fit-content;max-width:100%;margin-block:5px 3px;font-size:11px}
.crm-deal-number{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:11px;line-height:1.7;color:#435b74;min-width:0;font-weight:600}
.crm-deal-number svg{width:14px;height:14px;flex:none}.crm-deal-number bdi{font-variant-numeric:tabular-nums;font-weight:700}
.crm-detail>header p{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.crm-customer-record .crm-customer-deals{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.crm-search-group+.crm-search-group{margin-block-start:9px;padding-block-start:9px;border-top:1px solid #dbe3f0}
.crm-unified-results .crm-search-group>h4{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;gap:8px;border-inline-start:3px solid #4264aa;background:#e9effa;padding:8px 10px;min-height:35px}
.crm-search-group>h4>span{flex:1}.crm-search-group>h4>b{font-size:12px;color:#2e4b7c;background:#fff;padding:1px 7px;border-radius:5px}
.crm-unified-result small{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.crm-unified-result .crm-deal-number{font-size:11px;color:#354f79}
.crm-unified-results .crm-search-more{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:37px;margin-block-start:4px;background:#edf2fc!important;color:#294b87!important;border:1px solid #b4c5e2!important;border-radius:7px;font-size:12px!important}
.crm-search-more>small{font-size:11px;color:#466187}.crm-search-more>svg{width:17px;height:17px;flex:none}
.crm-unified-results .crm-search-error,.crm-unified-results .crm-search-empty{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.8;padding:9px;margin:5px 0}
.crm-unified-results .crm-search-error{color:#a1263e;background:#fff0f3;border:1px solid #e5afba;border-radius:7px}.crm-search-error>svg,.crm-search-empty>svg{width:19px;height:19px;flex:none}
@media(max-width:1050px){.crm-customer-record .crm-customer-deals{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){.crm-customer-record .crm-customer-deals{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.crm-customer-record .crm-customer-deals{grid-template-columns:minmax(0,1fr)}.crm-unified-results .crm-search-more{min-height:44px}}

.crm-deal-card.day-status-surface.is-closed{opacity:1}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-deal-number,.crm-customer-record .crm-customer-deal.day-status-surface>footer>small,.crm-customer-record .crm-customer-metrics>div.day-status-surface>span,#page-crm .crm-deal-card.day-status-surface .crm-deal-number,#page-crm .crm-deal-card.day-status-surface .crm-card-customer,#page-crm .crm-deal-card.day-status-surface .crm-card-meta em{color:var(--day-status-ink)}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-open,.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-deal-open:hover,#page-crm .crm-deal-card.day-status-surface:hover{background:var(--day-status-wash)!important}
.crm-customer-record .crm-customer-metrics>div.day-status-surface>small{color:var(--day-status-ink)}
.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-loss,.crm-customer-record .crm-customer-deal.day-status-surface .crm-customer-assignee{color:var(--day-status-ink)}

/* The search icon reserves its own text inset even under shared form styles. */
#appSection .erp-workspace .crm-customer-search>input{padding-inline-start:40px!important;padding-inline-end:12px!important;box-sizing:border-box}
#appSection .erp-workspace .crm-customer-search>svg{inset-inline-start:12px;inset-inline-end:auto;width:18px;height:18px}
.crm-sort-field>span{display:inline-flex;align-items:center;gap:6px}.crm-sort-field>span>svg{width:17px;height:17px;flex:none}
.crm-customer-filters .crm-sort-field,.crm-customer-toolbar .crm-sort-field{flex:0 1 155px;min-width:130px;max-width:180px;margin:0}
.crm-catalog-inactive{display:inline-flex;align-items:center;gap:4px;color:#5b4b26}.crm-catalog-inactive>svg{width:14px;height:14px}
@media(max-width:520px){.crm-customer-filters .crm-sort-field,.crm-customer-toolbar .crm-sort-field{flex:1 1 145px;max-width:none}}

/* Directory color identifies the record kind; contact dossier deal colors remain outcome-based. */
#page-crm .crm-contact-card{--contact-card-fill:#285cc4;background:var(--contact-card-fill);border-color:var(--contact-card-fill);color:#fff;box-shadow:0 3px 12px #14263d12}
#page-crm .crm-contact-card[data-contact-kind=organization]{--contact-card-fill:#63369c}
#page-crm .crm-contact-card .crm-contact-open.crm-record-link{color:#fff!important;background:transparent!important}
#page-crm .crm-contact-card :is(.crm-contact-title small,.crm-contact-open>svg,.crm-contact-phone,.crm-contact-phone svg,.crm-contact-phone a){color:#fff}
#page-crm .crm-contact-card .crm-contact-avatar{background:#fff;color:var(--contact-card-fill)}
#page-crm .crm-contact-card .crm-contact-avatar .day-solid-icon{--day-icon-detail:#fff}
#page-crm .crm-contact-card .crm-contact-open>svg.day-solid-icon,#page-crm .crm-contact-card .crm-contact-phone svg.day-solid-icon{--day-icon-detail:var(--contact-card-fill)}
#page-crm .crm-contact-card>footer{background:#00000014;border-top-color:#ffffff40}
#page-crm .crm-contact-card .crm-contact-count.crm-record-link{background:#fff!important;color:var(--contact-card-fill)!important}
#page-crm .crm-contact-card .crm-contact-count .day-solid-icon{--day-icon-detail:#fff}
#page-crm .crm-contact-card:is(:hover,:focus-within){border-color:#213958;box-shadow:0 5px 16px #14263d20}
#page-crm .crm-contact-card :is(.crm-contact-open,.crm-contact-count,a):focus-visible{outline:3px solid #fff;outline-offset:-3px}
#page-crm .crm-contact-card .crm-contact-count:focus-visible{outline-offset:2px}

/* The entire assignee/date row below its separator is the activity band; the card body stays white. */
#page-crm .crm-deal-card{padding:12px;gap:7px;background:#fff;color:#25324a;border:1px solid #cbd5e1;border-radius:10px;overflow:hidden;box-shadow:0 2px 7px #14263d08}
#page-crm .crm-deal-card:hover{background:#fff;border-color:#8a9bb4;box-shadow:0 4px 12px #14263d12}
#page-crm .crm-deal-card.is-closed{opacity:1}
#page-crm .crm-deal-card :is(.crm-card-customer,.crm-card-meta em,.crm-deal-number){color:#526177}
#page-crm .crm-deal-card .crm-card-meta em.is-overdue{padding:0;background:transparent;color:inherit}
#page-crm .crm-deal-card .crm-card-status.day-status-surface{background:var(--day-status-wash);color:var(--day-status-ink)}
#page-crm .crm-deal-card .crm-card-meta[data-activity-status]{
 --activity-fill:#ffd600;--activity-ink:#352b00;
 box-sizing:border-box;width:calc(100% + 24px);min-height:48px;margin-inline:-12px;margin-block-end:-12px;
 padding:9px 12px;border-top:1px solid #cbd5e1;background:var(--activity-fill);color:var(--activity-ink);
}
#page-crm .crm-deal-card .crm-card-meta[data-activity-status=overdue]{--activity-fill:#cf2026;--activity-ink:#fff}
#page-crm .crm-deal-card .crm-card-meta[data-activity-status=scheduled]{--activity-fill:#16813a;--activity-ink:#fff}
#page-crm .crm-deal-card .crm-card-meta[data-activity-status] em{color:var(--activity-ink)}
#page-crm .crm-deal-card .crm-card-meta[data-activity-status] .day-solid-icon{--day-icon-detail:var(--activity-fill)}
@media(forced-colors:active){
 #page-crm .crm-contact-card,#page-crm .crm-deal-card{background:Canvas;color:CanvasText;border-color:CanvasText}
 #page-crm .crm-contact-card :is(.crm-contact-title small,.crm-contact-open>svg,.crm-contact-phone,.crm-contact-phone svg,.crm-contact-phone a){color:CanvasText}
 #page-crm .crm-deal-card .crm-card-meta[data-activity-status]{forced-color-adjust:auto;background:Canvas;color:CanvasText;border-color:CanvasText}
}

#page-crm .crm-customer-toolbar{justify-content:flex-start;gap:10px}
#page-crm .crm-customer-toolbar .crm-customer-search{flex:1 1 190px;min-width:170px;max-width:360px}
#page-crm :is(.crm-customer-toolbar,.crm-customer-filters) .crm-sort-field{display:inline-flex;align-items:center;gap:8px;flex:0 1 160px;min-width:145px;max-width:180px}
#page-crm .crm-sort-field>.day-select{min-width:0;flex:1 1 120px}
#page-crm .crm-load-progress{margin:4px 14px 10px;color:#596579;font-size:13px;line-height:1.7}
@media(max-width:520px){#page-crm .crm-customer-toolbar .crm-customer-search{flex-basis:100%;max-width:none}#page-crm .crm-customer-toolbar .crm-customer-segments{flex-basis:100%}}

/* Card navigation and quick activity are independent controls, never nested buttons. */
#page-crm .crm-deal-card>.crm-deal-open.crm-record-link{display:grid;align-content:start;gap:7px;min-inline-size:0;inline-size:100%;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#fff!important;color:#25324a!important;text-align:start;white-space:normal;font:inherit;box-shadow:none!important;filter:none!important;cursor:pointer}
#page-crm .crm-deal-card>.crm-deal-open>b{display:block;font-size:14px;font-weight:700;line-height:1.65;overflow-wrap:anywhere;color:#25324a!important}
#page-crm .crm-deal-card>.crm-deal-open:is(:hover,:focus-visible) :is(.crm-card-customer,.crm-deal-number){color:#526177!important}
#page-crm .crm-deal-card>.crm-deal-open:focus-visible{outline:2px solid #274b82!important;outline-offset:3px}
#page-crm .crm-deal-card .crm-card-meta button.crm-card-activity{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-inline-size:34px;min-block-size:34px;inline-size:auto;margin:-3px 0!important;padding:3px 4px!important;background:transparent!important;color:var(--activity-ink)!important;border:0!important;border-radius:5px!important;box-shadow:none!important;filter:none!important;font:inherit;font-size:11px;cursor:pointer}
#page-crm .crm-deal-card .crm-card-meta .crm-card-activity svg{inline-size:19px;block-size:19px;flex:none;--day-icon-detail:var(--activity-fill)!important}
#page-crm .crm-deal-card .crm-card-meta .crm-card-activity:focus-visible{outline:2px solid currentColor!important;outline-offset:1px}
#page-crm .crm-deal-card .crm-card-meta .crm-card-activity:hover{box-shadow:inset 0 0 0 1px currentColor!important}
.crm-activity-context{margin:0 0 10px;padding:7px 10px;background:#f4f6f9;border-radius:6px;color:#344054;font-weight:600;overflow-wrap:anywhere}
@media(pointer:coarse){#page-crm .crm-deal-card .crm-card-meta button.crm-card-activity{min-block-size:44px;min-inline-size:44px}}
