.referral-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #c9d7fb;
  border-radius: 14px;
  background: #f4f7ff;
  color: #15265a;
}

.referral-card h3 {
  margin: 0;
  color: #17377d;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.15rem;
}

.referral-card > p:not(.referral-message) {
  margin: .45rem 0 .85rem;
  color: #52658f;
  font-size: .9rem;
  line-height: 1.45;
}

.referral-code-row {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.referral-code-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: .7rem .8rem;
  border: 1px dashed #7894d4;
  border-radius: 9px;
  background: #fff;
  color: #17377d;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-card button {
  min-height: 40px;
  border: 1px solid #24479b;
  border-radius: 9px;
  padding: .55rem .75rem;
  background: #24479b;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.referral-card button:hover:not(:disabled),
.referral-card button:focus-visible:not(:disabled) {
  background: #183573;
}

.referral-card button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.referral-actions {
  margin-top: .7rem;
}

.referral-actions button {
  width: 100%;
}

.referral-message {
  min-height: 1.2em;
  margin: .7rem 0 0;
  color: #6c4b39;
  font-size: .84rem;
  line-height: 1.4;
}

.referral-message.success {
  color: #18714f;
}

.referral-message.error {
  color: #a83a3a;
}

#memberInvitationField small {
  display: block;
  margin-top: .35rem;
  color: #63739a;
  font-size: .78rem;
  line-height: 1.35;
}

@media (max-width: 420px) {
  .referral-code-row {
    align-items: stretch;
    flex-direction: column;
  }
}
