.referral-details { color: #273247; }
.referral-details > summary { cursor: pointer; font-size: 20px; font-weight: 700; padding: 8px 0; }
.referral-details > summary small { margin-left: 12px; color: #778398; font-size: 13px; font-weight: 400; }
.referral-toolbar { display: flex; justify-content: flex-end; margin: 12px 0; }
.referral-lead { line-height: 1.8; }
.referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.referral-stats > div { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #f5f8ff; border-radius: 12px; }
.referral-stats span, .referral-row small { color: #778398; }
.referral-stats strong { color: #5266dd; font-size: 26px; overflow-wrap: anywhere; }
.referral-share { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px 24px; align-items: center; padding: 20px; border: 1px solid #e3e8f0; border-radius: 14px; }
.referral-qr { grid-row: span 3; width: 180px; height: 180px; }
.referral-link { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.referral-link input { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #dce2ee; border-radius: 8px; color: #273247; background: #fff; }
.referral-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.referral-actions button, .referral-toolbar button, .referral-actions a { padding: 10px 16px; border: 1px solid #dce2ee; border-radius: 8px; background: #fff; color: #5266dd; cursor: pointer; font: inherit; text-decoration: none; }
.referral-actions button:focus-visible, .referral-actions a:focus-visible, .referral-toolbar button:focus-visible, .referral-details > summary:focus-visible { outline: 2px solid #5266dd; outline-offset: 3px; }
.referral-toolbar button:disabled { opacity: .6; cursor: wait; }
.referral-status { min-height: 1.5em; line-height: 1.6; color: #778398; margin: 0; }
.referral-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid #e3e8f0; overflow-wrap: anywhere; }
.referral-details [hidden] { display: none !important; }
@media (max-width: 600px) {
  .referral-details > summary small { display: block; margin: 8px 0 0 18px; }
  .referral-stats { gap: 8px; }
  .referral-stats > div { padding: 12px 8px; }
  .referral-stats span { font-size: 12px; }
  .referral-share { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .referral-qr { grid-row: auto; justify-self: center; }
}
