/* ---------- دعوتِ دوستان (۲۰۲۶-۱۰-۲۷، طرحِ دوم؛ هم‌خانوادهٔ باکسِ موجودی) ---------- */
.refer {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 22px; padding: 20px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(19,27,43,.95), rgba(10,15,25,.96));
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
}
.refer::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: linear-gradient(135deg, rgba(123,92,255,.55), rgba(30,41,65,.6) 40%, rgba(30,41,65,.6) 60%, rgba(52,162,255,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.refer-glow { position: absolute; z-index: -1; pointer-events: none; inset: -45% auto auto -25%; width: 80%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(123,92,255,.18), transparent); }
.refer-head { display: flex; align-items: center; gap: 12px; }
.refer-icon { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #7b5cff, var(--brand)); box-shadow: 0 8px 22px -8px rgba(123,92,255,.8); }
.refer-icon svg { width: 22px; height: 22px; }
.refer-title { flex: 1; min-width: 0; line-height: 1.3; }
.refer h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.refer-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.refer-pct { flex: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  color: var(--mint); background: rgba(23,209,160,.12); box-shadow: inset 0 0 0 1px rgba(23,209,160,.3); }

.refer-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; padding: 0; }
.refer-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  padding: 12px 6px; border-radius: 16px; background: rgba(7,11,18,.5); box-shadow: inset 0 0 0 1px var(--line-soft);
  font-size: 12.5px; color: #c8d2e4; line-height: 1.3; }
.refer-steps i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700;
  color: var(--brand); background: rgba(52,162,255,.13); }
.refer-steps li:last-child i { color: var(--mint); background: rgba(23,209,160,.13); }
.refer-steps li:last-child { color: var(--mint); font-weight: 600; }

.refer #ref-off { margin-top: 16px; }
.refer .ref-connect { margin-top: 0; }
.ref-link { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 6px 6px 14px; border-radius: 16px;
  background: rgba(7,11,18,.6); box-shadow: inset 0 0 0 1px var(--line); }
.ref-link-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #dbe4f4; font-variant-numeric: tabular-nums; }
.ref-copy { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--pane-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .16s var(--ease-out), background-color .2s ease, color .2s ease; }
.ref-copy:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ref-copy:hover { background: #1a2436; } }
.ref-copy svg { width: 16px; height: 16px; }
.ref-copy .i-ok { display: none; }
.ref-copy.done { color: var(--mint); background: rgba(23,209,160,.12); }
.ref-copy.done .i-copy { display: none; }
.ref-copy.done .i-ok { display: block; }
.refer .ref-share { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.refer .ref-share svg { width: 18px; height: 18px; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ref-stats div { text-align: center; line-height: 1.3; }
.ref-stats div + div { border-left: 1px solid var(--line-soft); }
.ref-stats b { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ref-stats small { color: var(--muted); font-size: 12px; }
