.firm-referral-toolbar{display:flex;align-items:flex-end;gap:10px;margin-bottom:14px;padding:14px 15px;border:1px solid #24475a;border-radius:11px;background:#0b2030}
.firm-referral-toolbar label{display:grid;gap:6px;color:#789fb3;font-size:10px;font-weight:750;letter-spacing:.07em;text-transform:uppercase}
.firm-referral-toolbar select,.firm-referral-toolbar input{min-width:170px;height:39px;padding:8px 11px;border:1px solid #315a70;border-radius:7px;background:#071b28;color:#f3f8fb;font:inherit;font-size:13px;letter-spacing:normal;text-transform:none}
.firm-referral-toolbar .firm-referral-search{flex:1}
.firm-referral-toolbar .firm-referral-search input{width:100%}
.firm-referral-toolbar button{height:39px;padding:0 14px;border:1px solid #315a70;border-radius:7px;background:transparent;color:#55cce3;font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.referral-directory-panel{min-height:0;margin-bottom:12px}
.referral-directory-panel .panel-head p{margin:5px 0 0;color:#89aebe;font-size:13px}
.referral-company-form{display:grid;grid-template-columns:1.15fr 1.3fr repeat(4,1fr);gap:10px;align-items:end;padding:14px;border:1px solid #294e61;border-radius:11px;background:#091d2b}
.referral-company-form label{display:grid;gap:6px;color:#789fb3;font-size:10px;font-weight:750;letter-spacing:.06em;text-transform:uppercase}
.referral-company-form input,.referral-company-form select{width:100%;min-width:0;height:39px;padding:8px 10px;border:1px solid #315a70;border-radius:7px;background:#071b28;color:#f3f8fb;font:inherit;font-size:12px;text-transform:none}
.referral-company-form .referral-company-notes{grid-column:1 / -2}
.referral-company-form button{height:39px;padding:0 15px;border:0;border-radius:7px;background:#2fc6df;color:#062331;font-weight:800;cursor:pointer}
.referral-company-form button:disabled{cursor:wait;opacity:.55}
.referral-company-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.referral-company-list article{padding:13px 14px;border:1px solid #294e61;border-radius:10px;background:#0a2130}
.referral-company-list strong,.referral-company-list span{display:block}
.referral-company-list strong{color:#edf8fb;font-size:12px}
.referral-company-list span,.referral-company-list small{margin-top:4px;color:#7fa6b8;font-size:10px;line-height:1.45}
.referral-company-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.referral-company-card-head button,.referral-contact-actions button{padding:8px 11px;border:1px solid #315a70;border-radius:7px;background:#0c2939;color:#64d5e9;font:inherit;font-size:11px;font-weight:750;cursor:pointer}
.referral-contact-list{display:grid;gap:7px;margin-top:12px}
.referral-contact-list>p{margin:0;padding:10px;border:1px dashed #315366;border-radius:8px;color:#7fa6b8;font-size:11px}
.referral-contact-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-radius:8px;background:#071b28}
.referral-contact-row>span{text-align:right}
.referral-contact-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px;padding:11px;border:1px solid #315a70;border-radius:9px;background:#071b28}
.referral-contact-form[hidden]{display:none}
.referral-contact-form label{display:grid;gap:5px;color:#789fb3;font-size:10px;font-weight:750;text-transform:uppercase}
.referral-contact-form input{min-width:0;height:36px;padding:7px 9px;border:1px solid #315a70;border-radius:7px;background:#0a2130;color:#f3f8fb;font:inherit;font-size:12px;text-transform:none}
.referral-contact-actions{grid-column:1 / -1;display:flex;justify-content:flex-end;gap:8px}
.referral-contact-actions button[type="submit"]{border-color:#2fc6df;background:#2fc6df;color:#062331}
.firm-referral-ledger td small{display:block;margin-top:4px;color:#7fa6b8;font-size:10px}
.referral-directory-error{margin-bottom:10px;padding:10px 12px;border:1px solid #874350;border-radius:8px;background:#421f28;color:#ffabb6;font-size:12px}
.firm-referral-hero{min-height:0;margin-bottom:12px}
.firm-referral-hero .panel-head p,.firm-referral-ledger .panel-head p{margin:5px 0 0;color:#89aebe;font-size:13px}
.firm-referral-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.firm-referral-kpis article{padding:17px;border:1px solid #294e61;border-radius:11px;background:#091d2b}
.firm-referral-kpis span,.firm-referral-kpis small{display:block;color:#84aabc}
.firm-referral-kpis span{font-size:11px}
.firm-referral-kpis strong{display:block;margin:9px 0 6px;color:#f6fbfd;font:700 25px Manrope}
.firm-referral-kpis article:nth-child(2) strong{color:#37cbea}
.firm-referral-kpis small{font-size:10px;line-height:1.4}
.firm-referral-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.firm-referral-grid .panel{min-height:320px}
.firm-referral-bars{display:grid;gap:12px}
.referral-bar-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(100px,1.2fr) 32px;align-items:center;gap:12px}
.referral-bar-row strong,.referral-bar-row small{display:block}
.referral-bar-row strong{font-size:12px}
.referral-bar-row small{margin-top:3px;color:#789daf;font-size:10px}
.referral-bar-row i{height:7px;overflow:hidden;border-radius:999px;background:#071722}
.referral-bar-row b{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#28b7d3,#35d0e8)}
.referral-bar-row em{color:#a7c5d2;font-size:11px;font-style:normal;text-align:right}
.firm-referral-ledger{min-height:280px}
.firm-referral-ledger tbody tr[data-referral-lead]{cursor:pointer}
.firm-referral-ledger tbody tr[data-referral-lead]:hover{background:#112c3d}
.firm-referral-type{display:inline-block;max-width:260px;padding:5px 8px;border-radius:999px;background:#153d4f;color:#68d4e8;font-size:10px;font-weight:750}
.firm-referral-empty{padding:24px;color:#82a9bb;text-align:center}
.firm-referral-loading,.firm-referral-error{display:grid;min-height:180px;place-content:center;color:#91b5c6;text-align:center}
.firm-referral-error{gap:7px;border-color:#82434e;color:#ff98a6}
.firm-referral-error strong,.firm-referral-error span{display:block}
.broker-referrals-panel{min-height:260px;margin-top:12px}
.broker-referrals-panel .panel-head p{margin:5px 0 0;color:#89aebe;font-size:13px}
.broker-referrals-table tbody tr[data-broker-referrals]{cursor:pointer}
.broker-referrals-table tbody tr[data-broker-referrals]:hover{background:#112c3d}
body.adviser-workspace .broker-referrals-panel .panel-head .pill{border-color:rgba(50,198,156,.38);color:#6be3bd}
@media(max-width:1100px){.firm-referral-toolbar{flex-wrap:wrap}.firm-referral-toolbar .firm-referral-search{flex-basis:100%}.firm-referral-kpis{grid-template-columns:repeat(2,1fr)}.firm-referral-grid{grid-template-columns:1fr}.referral-company-form{grid-template-columns:repeat(2,1fr)}.referral-company-form .referral-company-notes{grid-column:1 / -1}.referral-company-list{grid-template-columns:1fr}}
@media(max-width:680px){.firm-referral-toolbar label,.firm-referral-toolbar select,.firm-referral-toolbar input{width:100%;min-width:0}.firm-referral-toolbar label{flex-basis:100%}.firm-referral-kpis{grid-template-columns:1fr}.referral-bar-row{grid-template-columns:1fr 70px 24px}}
