/* Referrer-led workflow: information stays a lead until the user confirms an introduction. */
.referral-flow{padding:19px 22px;margin:0 0 23px;border:1px solid #d8e6f3;border-left:3px solid var(--brand-blue,#0075d4);border-radius:10px;background:#fff}
.referral-flow>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#254f77;font-size:12px;font-weight:500}
.referral-flow>div>span{padding:5px 9px;border-radius:5px;background:#f0f6fc}
.referral-flow b{color:#91abc4;font-size:12px;font-weight:400}
.referral-flow p{margin:11px 0 0;color:#62758a;font-size:11px;line-height:1.9}
.referrer-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.referrer-rating{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:1px solid transparent;border-radius:4px;font-size:10px;font-weight:600;line-height:1.6;white-space:nowrap;vertical-align:middle}
.referrer-rating-A{background:#fbf0d7;color:#8a6018;border-color:#efdeb6}
.referrer-rating-B{background:#e5f2ff;color:#0865af;border-color:#c9e2fa}
.referrer-rating-C{background:#f2f3f6;color:#65718a;border-color:#e0e3ea}
.referrer-rating-unset{background:#f2f5f9;color:#728196;border-color:#e4eaf1;font-weight:400}
.referral-rating-line{margin:-3px 0 9px}
.referral-center-hero>.referrer-rating{margin-left:auto}
.referral-person-card{display:flex;flex-direction:column;padding:24px;border-color:#dfe7ef;background:#fff}
.referral-person-card .directory-card-header{align-items:flex-start;margin-bottom:12px}
.referral-person-card .person-card-heading{flex:1;min-width:0}
.referral-person-card .person-card-heading>.entity-link{color:var(--text,#172f4b);font-size:16px;font-weight:550;line-height:1.6}
.referral-person-card .directory-card-header>.action-link{flex-shrink:0;min-height:30px}
.referral-person-card .entity-secondary{color:#62758a;line-height:1.8}
.referral-card-background{color:#4c6781;font-size:12px;line-height:1.9;white-space:pre-wrap;margin:0 0 8px;overflow-wrap:anywhere}
.referral-card-owner{font-size:10px;color:#62758a;line-height:1.8}
.referral-card-counts{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:19px 0;padding:14px 0;border-top:1px solid #e6edf5;border-bottom:1px solid #e6edf5}
.referral-card-counts>div{display:flex;align-items:baseline;gap:10px;padding:0 12px}
.referral-card-counts>div:first-child{padding-left:0;border-right:1px solid #e1eaf3}
.referral-card-counts strong{font-size:25px;color:#165a93;font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums}
.referral-card-counts span{font-size:11px;color:#5e748b;line-height:1.8}
.referral-label{display:block;font-size:10px;color:#62758a;font-weight:500;line-height:1.8;margin-bottom:7px}
.referral-card-list{margin-bottom:14px}
.referral-mini-list{display:grid;gap:6px}
.referral-mini-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.referral-mini-list .action-link{font-size:12px;text-align:left;line-height:1.8;min-height:30px;overflow-wrap:anywhere}
.referral-status{display:inline-flex;align-items:center;flex-shrink:0;padding:3px 7px;border:1px solid transparent;border-radius:5px;font-size:9px;line-height:1.8;white-space:nowrap;font-weight:400}
.referral-status-new{color:#5c7289;background:#eef3f8;border-color:#e1e9f1}
.referral-status-introducing{color:#0865af;background:#eaf4ff;border-color:#cfe3f8}
.referral-status-connected{color:#165b94;background:#edf5fd;border-color:#c7ddf1}
.referral-status-paused{color:#876b3e;background:#f7f3ec;border-color:#eae1d3}
.referral-more{display:block;margin-top:7px;font-size:10px;color:#6b8095;line-height:1.8}
.referral-empty-copy{font-size:11px;line-height:1.9;color:#687e94;margin:0;overflow-wrap:anywhere}
.referral-card-customers{margin:0 0 15px}
.referral-customer-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.referral-customer-chip{display:inline-flex;align-items:center;border:1px solid #dce9f6;background:#f4f8fd;border-radius:6px;color:#236598;font:inherit;font-size:10px;line-height:1.8;padding:6px 8px;max-width:100%;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.referral-customer-chip:hover{background:#e8f3ff;border-color:#b7d4ee}
.referral-card-communication{padding-top:14px;border-top:1px solid #e8eef5}
.referral-card-communication p{font-size:11px;line-height:1.9;color:#657c93;margin:0 0 15px;white-space:pre-wrap;overflow-wrap:anywhere}
.referral-card-next{padding:14px 15px;background:#f3f8fe;border:1px solid #e1edf8;border-radius:8px;margin-top:auto}
.referral-card-next>.referral-label{color:#527493;margin-bottom:5px}
.referral-card-next .next-action{max-width:none;font-size:12px;line-height:1.9;color:#365e82}
.referral-card-next .next-action>.action-link{display:inline-flex;min-height:32px;margin-top:4px;font-size:10px}
.referral-card-next .due-date{display:block;color:#647c93}
.referral-card-next .due-date.overdue{color:#9b6f29}
.referral-card-actions{display:flex;align-items:center;justify-content:space-between;gap:9px;padding-top:16px}
.referral-person-card .button,.referral-center .button,.referral-lead-detail .button{min-height:44px}
.referral-center-hero{display:flex;align-items:flex-start;gap:13px;margin-bottom:14px}
.referral-center-hero>.avatar{width:46px;height:46px;background:#e8f3ff;color:#0865af;margin-top:3px}
.referral-center-hero>div:nth-child(2){min-width:0;flex:1}
.referral-center-hero .referral-label{margin-bottom:3px;color:#52718e}
.referral-center-hero h2{margin-top:0;margin-bottom:6px;overflow-wrap:anywhere}
.referral-center-hero>.referral-status{margin-top:7px}
.referral-center-counts{display:flex;align-items:center;gap:13px 26px;flex-wrap:wrap;padding:14px 17px;border:1px solid #dbe8f4;background:#f1f7fe;border-radius:8px;color:#52708e;font-size:11px}
.referral-center-counts strong{font-size:20px;font-weight:500;color:#165b94;margin-right:5px;font-variant-numeric:tabular-nums}
.referral-center-actions{margin:17px 0 24px}
.referral-center .detail-section>h3,.referral-lead-detail .detail-section>h3{color:#254f77}
.referral-center .detail-plan,.referral-lead-detail .detail-plan{margin-top:0}
.referral-center .detail-plan .next-action,.referral-lead-detail .detail-plan .next-action{max-width:none;font-size:13px;color:#315c83}
.referral-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:17px;margin-bottom:17px}
.referral-section-heading>div{flex:1;min-width:0}
.referral-section-heading h3{display:flex;align-items:center;gap:8px;color:#254f77;font-size:14px;line-height:1.8;font-weight:550;margin:0}
.referral-section-heading h3>span{display:inline-grid;place-items:center;height:21px;min-width:21px;padding:0 6px;border-radius:5px;background:#edf4fb;color:#5d7d9c;font-size:10px;font-weight:400}
.referral-section-heading p{font-size:10px;line-height:1.9;color:#657c93;margin:7px 0 0}
.referral-section-heading>.button{flex-shrink:0;white-space:normal}
.referral-section-empty{padding:30px 22px;border:1px dashed #cbddeb;border-radius:9px;background:#f8fbff;text-align:center}
.referral-section-empty h4{color:#365e82;font-size:13px;font-weight:500;line-height:1.9;margin:0 0 9px}
.referral-section-empty p{font-size:11px;line-height:1.9;color:#687e94;max-width:430px;margin:0 auto 17px}
.referral-lead-list{display:grid;gap:16px}
.referral-lead-card{padding:19px;border:1px solid #dce7f1;border-radius:10px;background:#fff;box-shadow:0 2px 5px #10233e03}
.referral-lead-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:15px}
.referral-lead-heading>div{min-width:0;flex:1}
.referral-lead-heading .referral-label{margin-bottom:3px}
.referral-lead-name{display:block;padding:0;border:0;background:transparent;text-align:left;line-height:1.7;color:#1d5b91;font-size:15px;font-weight:550;overflow-wrap:anywhere;cursor:pointer}
.referral-lead-name:hover{color:var(--brand-hover,#0064b6)}
.referral-lead-heading>.referral-status{margin-top:5px}
.referral-lead-intelligence{padding:12px 14px;border-left:2px solid #bad4ed;background:#f7faff;border-radius:0 6px 6px 0}
.referral-lead-intelligence .referral-label{font-size:9px;margin-bottom:5px}
.referral-lead-intelligence p{font-size:12px;color:#49677f;line-height:1.95;margin:0;overflow-wrap:anywhere}
.referral-lead-source{font-size:10px;color:#6b8095;line-height:1.9;margin-top:9px;overflow-wrap:anywhere}
.referral-lead-meta{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap;color:#647b92;font-size:10px;margin:12px 0 14px;line-height:1.8}
.referral-lead-followup{padding-top:12px;border-top:1px solid #e6edf4}
.referral-lead-followup .next-action{font-size:12px;color:#3e6080;max-width:none;line-height:1.9}
.referral-lead-followup .due-date{display:block;color:#677f95}
.referral-lead-followup .due-date.overdue{color:#9b6f29}
.referral-lead-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:16px;border-top:1px solid #e7eef5;padding-top:13px}
.referral-lead-actions>.button{font-size:10px;padding:9px 11px;line-height:1.6;white-space:normal}
.referral-lead-actions>.button-primary{margin-left:auto}
.referral-linked-customer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#eff6fe;border-radius:6px;padding:11px 12px;margin-top:13px;font-size:10px;color:#577693}
.referral-linked-customer>.action-link{font-size:11px}
.referral-formal-customer{background:#f7faff;border-color:#dfeaf4}
.referral-formal-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.referral-source-referrer{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px;color:#627a92;line-height:1.9}
.referral-source-referrer .action-link{font-size:12px}
.referral-lead-detail-actions{gap:8px;margin:18px 0}
.referral-lead-detail-actions>.button{font-size:11px;white-space:normal}
.referral-conversion-note{padding:16px 17px;border:1px solid #d8e7f5;border-left:3px solid var(--brand-blue,#0075d4);border-radius:7px;background:#f1f7fe}
.referral-conversion-note strong{display:block;color:#315e87;font-size:12px;font-weight:500;line-height:1.9;margin-bottom:5px}
.referral-conversion-note p{font-size:11px;line-height:1.95;color:#627b92;margin:0;overflow-wrap:anywhere}
.referral-conversion-complete{background:#eef5fc;border-color:#cbdff1}
.referral-intelligence{padding:17px 18px;background:#f5f9fe;border:1px solid #dfeaf5;border-radius:8px;color:#395d7c;font-size:13px;line-height:2;overflow-wrap:anywhere}
.referral-intelligence>.referral-label{margin-bottom:8px}
.referral-information-source{margin-top:15px;padding:0 2px}
.referral-form-note{grid-column:1/-1;background:#edf5fd;color:#54718c;border:1px solid #d9e7f5;margin-bottom:0;font-size:11px;line-height:1.9}
.referral-form-hint{grid-column:1/-1;padding:12px 14px;border:1px solid #e1e9f1;border-radius:7px;background:#f7f9fc;color:#657b91;font-size:11px;line-height:1.9}
@media(min-width:1500px){.referrer-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){.referrer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.referral-person-card{padding:20px}.referral-card-counts>div{gap:7px;padding:0 9px}.referral-card-counts span{font-size:10px}.referral-card-actions{align-items:stretch;flex-wrap:wrap}.referral-card-actions>.button{flex:1;font-size:10px;white-space:normal}}
@media(max-width:700px){.referrer-grid{grid-template-columns:minmax(0,1fr)}.referral-flow{padding:17px 18px;margin-bottom:20px}.referral-flow>div{gap:7px;font-size:10px}.referral-flow>div>span{padding:5px 6px}.referral-flow p{font-size:10px}.referral-person-card{padding:20px}.referral-card-counts{margin:17px 0}.referral-card-counts span{font-size:11px}.referral-card-counts strong{font-size:24px}.referral-card-actions{flex-wrap:nowrap}.referral-card-actions>.button{font-size:11px}.referral-center-hero{gap:11px;flex-wrap:wrap}.referral-center-hero>.avatar{width:39px;height:39px}.referral-center-hero>.referral-status{margin-left:50px;margin-top:0}.referral-center-counts{gap:10px 17px;font-size:10px;padding:12px 14px}.referral-center-counts strong{font-size:18px}.referral-center-actions>.button-primary{width:100%}.referral-section-heading{gap:11px;flex-direction:column}.referral-section-heading>.button{width:100%}.referral-lead-card{padding:16px}.referral-lead-name{font-size:14px}.referral-lead-intelligence{padding:11px 12px}.referral-lead-actions{gap:6px}.referral-lead-actions>.button{flex:1;font-size:10px}.referral-lead-actions>.button-primary{margin-left:0;flex-basis:100%}.referral-lead-detail-actions>.button-primary{width:100%}.referral-lead-detail-actions>.button-secondary{flex:1}.referral-conversion-note{padding:14px 15px}.referral-intelligence{padding:15px;font-size:12px}.referral-formal-customer{align-items:flex-start}.referral-formal-badges{justify-content:flex-end}.referral-section-empty{padding:25px 17px}}
@media(prefers-reduced-motion:reduce){.referral-person-card *{scroll-behavior:auto!important;transition:none!important}}

/* Ownership is separate from the location where the customer operates. */
.capital-origin-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid #dce6f1;border-radius:5px;background:#f4f8fc;color:#365e80;padding:3px 7px;font-size:10px;line-height:1.7;font-weight:400;white-space:nowrap}
.capital-origin-badge.capital-origin-muted{background:#f1f3f5;border-color:#dfe3e8;color:#5e6673;font-weight:400}
.capital-origin-badge.capital-origin-priority{background:#eaf3ff;border-color:#bfd8f4;color:#075faf;font-weight:750}
.capital-name.capital-origin-muted:not(.button){color:#6b7280;font-weight:400}
.capital-name.capital-origin-priority:not(.button){color:#075faf;font-weight:750}
.capital-name.capital-origin-muted:not(.button):hover{color:#4b5563}
.capital-name.capital-origin-priority:not(.button):hover{color:#004f98}
.business-summary{display:grid;gap:5px;color:#5c7187;font-size:10px;line-height:1.9;margin-top:8px;overflow-wrap:anywhere}
.business-summary-tags{display:flex;align-items:center;flex-wrap:wrap;gap:6px 11px}
.business-estimate{display:inline-flex;border:1px solid #dfe7ef;border-radius:3px;padding:0 4px;color:#677c91;font-size:9px;margin-left:3px}
.referral-lead-card>.business-summary{margin-top:-4px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #e8eef5}
.business-estimate-note{color:#6b7d91;font-size:10px;line-height:1.8;margin:14px 0 0}
.member-english-name{font-size:11px;color:#526c87;line-height:1.8;margin-top:3px;overflow-wrap:anywhere}
.capital-style-legend{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;color:#61778e;font-size:10px;line-height:1.8;margin:0 0 17px}
.lead-insight-summary{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.lead-insight-summary>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.lead-insight-summary strong{font-size:24px;color:#174f86;font-weight:650}
.lead-insight-summary strong small{font-size:12px;font-weight:400;color:#6b7d91}
.lead-insight-summary>div>span,.lead-insight-summary time{font-size:11px}
.lead-verification-label{color:#526c87}
.lead-background-summary{font-size:12px;line-height:1.8;color:#45627e;overflow-wrap:anywhere}
.lead-insight-evidence{margin-top:12px;border-top:1px solid #e4ecf5;padding-top:4px}
.lead-insight-evidence summary{display:list-item;cursor:pointer;min-height:44px;align-content:center;color:#1462ac;font-size:12px}
.lead-insight-evidence summary:focus-visible{outline:2px solid #0874d9;outline-offset:2px;border-radius:4px}
.lead-insight-breakdown{list-style:none;margin:12px 0;padding:0;display:grid;gap:10px}
.lead-insight-breakdown li{background:#f5f8fc;border:1px solid #e4ecf5;border-radius:8px;padding:12px}
.lead-insight-breakdown li>div{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#294d74}
.lead-insight-breakdown p{font-size:11px;line-height:1.7;color:#61778e;margin:6px 0 0;overflow-wrap:anywhere}
.lead-insight-sources{display:grid;gap:4px;font-size:12px}
.lead-insight-sources a{display:flex;align-items:center;min-height:44px;overflow-wrap:anywhere;color:#1462ac;text-decoration:underline;text-underline-offset:3px}
.referral-lead-readiness{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#61778e;margin:-2px 0 14px}
.referral-lead-readiness strong{font-size:13px;color:#174f86}
@media(max-width:700px){.business-summary{font-size:11px}.business-estimate-note{font-size:10px}.capital-origin-badge{font-size:10px}}

/* Customer overview keeps ownership and the next action visible together. */
.customer-collaboration-table .customer-cell-name{width:25%;min-width:200px}
.customer-collaboration-table .customer-cell-plan{width:29%;min-width:220px}
.customer-collaboration-table .customer-cell-owner{min-width:110px}
.customer-collaboration-table .customer-owner-name{font-size:12px;color:#274f78;font-weight:600}
.customer-collaboration-table .customer-cell-due{min-width:115px}
.customer-collaboration-table .customer-cell-due .due-date{white-space:nowrap}
.customer-list-background .customer-list-industry{max-width:210px;line-height:1.7;overflow-wrap:anywhere}
.customer-list-location{font-weight:500;color:#4d6884}
.customer-next-action{max-width:330px;overflow-wrap:anywhere}
.customer-plan-missing{padding:10px 12px;border:1px solid #eedbb5;border-radius:7px;background:#fff8eb}
.customer-plan-needed{font-size:12px;font-weight:600;color:#94671b}
.next-action-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:7px}
.customer-plan-action{font-weight:550}
.customer-collaboration-table .customer-cell-actions{white-space:nowrap;min-width:82px}
@media(max-width:700px){
  .customer-list-panel{border:0;background:transparent;box-shadow:none;overflow:visible}
  .customer-collaboration-table{display:block;width:100%;min-width:0}
  .customer-collaboration-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .customer-collaboration-table tbody{display:grid;gap:14px}
  .customer-collaboration-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;padding:20px;border:1px solid #dfe7ef;border-radius:12px;background:#fff}
  .customer-collaboration-table tbody td{display:block;width:auto;min-width:0;padding:0;border:0;font-size:12px}
  .customer-collaboration-table .customer-cell-name,.customer-collaboration-table .customer-cell-plan,.customer-collaboration-table .customer-cell-owner,.customer-collaboration-table .customer-cell-due{width:auto;min-width:0}
  .customer-collaboration-table .customer-cell-name{grid-column:1/-1;order:0;padding-bottom:14px;border-bottom:1px solid #e9eff6}
  .customer-collaboration-table .customer-cell-contact{grid-column:1/-1;order:1}
  .customer-collaboration-table .customer-cell-owner{order:2}
  .customer-collaboration-table .customer-cell-due{order:3}
  .customer-collaboration-table .customer-cell-plan{grid-column:1/-1;order:4}
  .customer-collaboration-table .customer-cell-actions{grid-column:1/-1;order:5;min-width:0}
  .customer-collaboration-table [data-label]::before{content:attr(data-label);display:block;color:#7b8da1;font-size:10px;margin-bottom:7px;letter-spacing:.4px}
  .customer-collaboration-table .customer-owner-name{font-size:13px}
  .customer-collaboration-table .next-action{max-width:none}
  .customer-collaboration-table .next-action-controls{gap:18px;margin-top:10px}
  .customer-collaboration-table .next-action-controls button{min-height:34px;padding:4px 0}
  .customer-collaboration-table .customer-list-industry{max-width:none}
  .customer-collaboration-table .due-date{margin:0}
}
