#view-referrals .referral-settings { padding:0; margin-top:28px; overflow:hidden; background:#fff; border:1px solid #dce5ec; box-shadow:0 5px 22px #17324d08; }
.referral-settings[hidden] { display:none; }
.rs-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:26px 28px; border-bottom:1px solid #e6edf2; background:#f9fbfd; }
.rs-heading h3 { font-size:22px; letter-spacing:-.035em; margin:4px 0 8px; }
.rs-heading p,.rs-section-head p { font-size:13px; color:#63778a; line-height:1.6; margin:0; max-width:620px; }
.rs-admin { white-space:nowrap; font-size:11px; font-weight:600; padding:7px 11px; border-radius:7px; color:#526a80; background:#eaf0f5; }
.referral-settings form { padding:26px 28px 0; }
.rs-section-head { display:flex; gap:16px; justify-content:space-between; align-items:center; margin-bottom:20px; }
.rs-section-head h4 { font-size:16px; margin:0 0 5px; }
.referral-settings .add-recipient { min-height:40px; color:#1268a8; border:1px solid #b9d5e9; background:#f2f8fc; padding:10px 16px; font-weight:650; white-space:nowrap; }
.referral-settings .recipients { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.referral-settings .recipient-card { min-width:0; padding:20px; border:1px solid #dce5ec; border-radius:12px; background:#fff; box-shadow:0 3px 12px #18374f05; }
.referral-settings .recipient-card.is-enabled { border-color:#99c7b7; }
.recipient-card-heading { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.recipient-avatar { width:36px; height:36px; flex:none; border-radius:10px; background:#eaf3fa; color:#185e91; display:grid; place-items:center; font-size:12px; font-weight:750; }
.recipient-card-heading strong { font-size:14px; overflow-wrap:anywhere; min-width:0; flex:1; }
.referral-settings .recipient-remove { border:0; background:transparent; color:#9b4b51; font-size:11px; padding:5px; min-height:32px; width:66px; line-height:1.4; }
.referral-settings .recipient-card .editor-row-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.recipient-card .editor-row-grid label { display:flex; flex-direction:column; gap:7px; font-size:12px; font-weight:650; color:#405a70; min-width:0; }
.referral-settings .recipient-card input:not([type=checkbox]),.referral-settings .recipient-card select { width:100%; min-width:0; min-height:43px; font-size:13px; padding:10px 11px; border:1px solid #cfdce6; border-radius:8px; box-sizing:border-box; }
.referral-settings input:focus-visible,.referral-settings select:focus-visible,.referral-settings button:focus-visible,.rs-contacts summary:focus-visible { outline:3px solid #afd6f2; outline-offset:2px; }
.referral-settings .recipient-toggle { display:grid; grid-template-columns:38px 1fr; gap:4px 10px; margin:20px 0 0; padding-top:16px; border-top:1px solid #edf1f4; font-size:12px; color:#314f67; }
.referral-settings .recipient-toggle input { appearance:none; width:36px; height:21px; min-height:0; padding:0; border:0; border-radius:20px; background:#bdcbd6; cursor:pointer; position:relative; grid-row:1/3; margin:2px 0 0; }
.recipient-toggle input::after { content:''; position:absolute; top:3px; left:3px; width:15px; height:15px; border-radius:50%; background:white; box-shadow:0 1px 3px #0002; transition:transform .15s; }
.referral-settings .recipient-toggle input:checked { background:#24836a; }
.recipient-toggle input:checked::after { transform:translateX(15px); }
.recipient-enabled-label { grid-column:2; font-size:11px; color:#6b7e8d; }
.rs-notice { display:flex; flex-direction:column; gap:5px; margin:22px 0; padding:14px 16px; background:#fff9ee; border:1px solid #efe0bf; border-radius:9px; color:#765e30; font-size:12px; line-height:1.6; }
.rs-notice strong { font-size:12px; }
.rs-contacts { border-top:1px solid #e6edf2; }
.rs-contacts summary { cursor:pointer; padding:18px 0; color:#344e63; font-size:13px; font-weight:650; }
.rs-contacts summary span { margin-left:10px; font-weight:400; color:#7b8d9b; font-size:11px; }
.rs-contacts .referral-contacts { padding:4px 0 20px; gap:16px; }
.referral-settings .rs-footer { display:flex; justify-content:space-between; align-items:center; gap:20px; border-top:1px solid #e6edf2; padding:18px 0; margin-top:0; }
.rs-footer .settings-message { font-size:12px; color:#546d80; line-height:1.5; }
.rs-footer .primary { flex:none; min-width:150px; }
.rs-no-recipients { padding:30px; border:1px dashed #c8d7e2; border-radius:12px; color:#667e90; text-align:center; font-size:13px; }
.rs-no-recipients[hidden] { display:none; }
#view-referrals .referral-empty { min-height:150px; display:flex; flex-direction:column; justify-content:center; gap:10px; }
#view-referrals .referral-empty span { margin:0; }
@media(max-width:1000px) { .referral-settings .recipients { grid-template-columns:1fr; } }
@media(max-width:600px) { .rs-heading { padding:20px; flex-direction:column; gap:12px; }.referral-settings form { padding:20px 16px 0; }.rs-section-head { align-items:stretch; flex-direction:column; }.referral-settings .recipient-card .editor-row-grid { grid-template-columns:1fr; }.referral-settings .rs-footer { align-items:stretch; flex-direction:column; }.rs-contacts summary span { display:block; margin:6px 0 0; } }
@media(prefers-reduced-motion:reduce) { .recipient-toggle input::after { transition:none; } }
.relay-progress { margin-top:16px; padding:14px; border:1px solid #d6e6ef; border-radius:10px; background:#f4f9fc; font-size:12px; line-height:1.6; }
.relay-progress p { margin:6px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.referral-settings input[readonly],.referral-settings select:disabled { background:#f3f6f9; color:#4e667b; border-color:#e1e8ed; }
