/* referral.css — 추천인·크레딧 */

.referral-content {
  padding: 20px 16px 24px;
  overflow-y: auto;
  flex: 1;
}

.referral-section {
  margin-bottom: 20px;
}

.referral-section:first-child {
  margin-top: 4px;
}

.referral-section__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text-primary, #1a1a1a);
}

.referral-section__count {
  font-weight: 500;
  color: var(--text-muted, #666);
  font-size: 13px;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.referral-stat {
  background: var(--surface-elevated, #f7f8fa);
  border-radius: 10px;
  padding: 12px;
}

.referral-stat__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #666);
  margin-bottom: 4px;
}

.referral-stat__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand, #2563eb);
}

.referral-stat__value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #666);
}

.referral-code-box {
  background: var(--surface-elevated, #f7f8fa);
  border-radius: 12px;
  padding: 14px;
}

.referral-code-box__code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 10px 0;
}

.referral-code-box__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.referral-btn {
  border: 1px solid var(--border, #d0d5dd);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.referral-btn:hover {
  background: #f3f4f6;
}

.referral-qr {
  text-align: center;
  margin: 8px 0 20px;
}

.referral-qr img {
  border-radius: 8px;
  background: #fff;
}

.referral-hint {
  font-size: 12px;
  color: var(--text-muted, #666);
  line-height: 1.5;
  margin: 0;
  text-align: center;
}

.referral-referee {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
}

.referral-referee__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.referral-referee__name {
  font-size: 14px;
}

.referral-referee__status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}

.referral-referee__status--rewarded {
  background: #ecfdf5;
  color: #047857;
}

.referral-referee__status--converted {
  background: #fff7ed;
  color: #c2410c;
}

.referral-referee__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--text-muted, #666);
}

.referral-referee__pending {
  color: var(--brand, #2563eb);
  font-weight: 600;
}

.referral-empty {
  color: var(--text-muted, #666);
  font-size: 13px;
  padding: 12px 0;
}

.referral-status {
  margin: 8px 16px 0;
  font-size: 13px;
  color: #047857;
}

.referral-status--error {
  color: #b91c1c;
}

.referral-admin-credit {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #e5e7eb);
}

.referral-admin-credit__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.referral-admin-credit__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.referral-admin-credit__input {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 8px;
}

.referral-admin-credit__btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.referral-admin-credit__btn--grant {
  background: #2563eb;
  color: #fff;
}

.referral-admin-credit__btn--revoke {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.settings-referral-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-elevated, #f7f8fa);
  border-radius: 10px;
}

.settings-referral-summary__label {
  font-size: 13px;
  color: var(--text-muted, #666);
}

.settings-referral-summary__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand, #2563eb);
}

.settings-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border, #d0d5dd);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.settings-btn-secondary:hover {
  background: #f9fafb;
}

@media (min-width: 900px) {
  .referral-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
