/* Referral Program — Black/Gold Dark Theme */

.referral-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

/* ── Hero ── */
.referral-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.referral-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: #fff;
}

.referral-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: #f59e0b;
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.referral-subtitle {
  color: #888;
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Link Card ── */
.referral-link-card {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.referral-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.referral-link-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.referral-link-input {
  flex: 1;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ccc;
  font-size: 0.9rem;
  font-family: var(--font-mono, monospace);
  outline: none;
  transition: border-color 0.2s;
}

.referral-link-input:focus {
  border-color: #f59e0b;
}

.referral-link-row .btn {
  white-space: nowrap;
}

.referral-link-row .btn-primary {
  background: #f59e0b;
  color: #000;
  border: none;
  font-weight: 600;
}

.referral-link-row .btn-primary:hover {
  background: #d97706;
}

.referral-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.referral-toggle-label {
  font-size: 0.85rem;
  color: #888;
}

/* Toggle — custom gold */
.referral-toggle-row .toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.referral-toggle-row .toggle-slider.active {
  background: #f59e0b;
}

.referral-toggle-row .toggle-knob {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.referral-toggle-row .toggle-slider.active .toggle-knob {
  transform: translateX(20px);
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card-accent {
  border-color: rgba(245, 158, 11, 0.2);
}

.stat-card-accent .stat-value {
  color: #f59e0b;
}

/* ── Breakdown ── */
.referral-breakdown-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.breakdown-card {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
}

.breakdown-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row span:last-child {
  font-weight: 600;
  color: #f59e0b;
}

/* ── History ── */
.referral-history-section {
  margin-bottom: 2rem;
}

.history-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.history-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  font-family: inherit;
}

.history-tab:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.history-tab.active {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
  font-weight: 600;
}

.history-panel.hidden {
  display: none;
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
}

.referral-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.referral-table td {
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-empty {
  text-align: center;
  color: #666;
  padding: 2rem !important;
  font-size: 0.88rem;
}

/* ── FAQ ── */
.referral-faq details {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
}

.referral-faq summary {
  font-weight: 600;
  color: #e0e0e0;
  font-size: 0.92rem;
}

.referral-faq details[open] summary {
  margin-bottom: 0.75rem;
}

.referral-faq p {
  color: #888;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Status colors ── */
.status-qualified { color: #22c55e; }
.status-pending   { color: #f59e0b; }

/* ── Referral CTA card on vote page ── */
.referral-cta-card {
  margin-top: 1rem;
}

.referral-cta-card .text-muted {
  padding: 0 1rem 1rem;
  color: #888;
}

.referral-cta-card .cta-buttons {
  padding: 0 1rem 1rem;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .referral-container {
    padding: var(--navbar-offset) 1rem 3rem;
  }

  .referral-title {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .referral-breakdown-section {
    grid-template-columns: 1fr;
  }

  .referral-link-row {
    flex-direction: column;
  }

  .referral-link-input {
    width: 100%;
  }
}
