/* ============================================================
   AUKTIONSHAUS24 - Empfehlungen / TOP-Belohnungen
   ============================================================ */
.ref-page { max-width: 1080px; margin: 0 auto; padding: 18px 14px 48px; }

.ref-hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 28px 26px;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand) 55%, #149d78);
  color: #fff; box-shadow: 0 16px 40px rgba(14, 122, 95, .22);
}
.ref-hero::after {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.ref-hero-icon { font-size: 40px; display: block; margin-bottom: 6px; }
.ref-hero h1 { margin: 0 0 10px; font-size: clamp(23px, 4vw, 34px); line-height: 1.15; }
.ref-hero p { margin: 6px 0; max-width: 760px; line-height: 1.55; color: rgba(255,255,255,.94); }
.ref-hero b { color: #fff; }
.ref-terms { font-size: 12px; opacity: .85; }
.ref-terms a { color: #fff; text-decoration: underline; }

.ref-loading, .ref-empty {
  padding: 22px; border-radius: 16px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line); color: var(--ink-2);
}
.ref-dashboard { margin-top: 18px; }

.ref-link-card,
.ref-voucher,
.ref-reward,
.admin-panel[data-panel="referrals"] {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.ref-link-card label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.ref-link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-link-row input {
  flex: 1 1 260px; min-width: 0; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 13px;
}
.ref-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-whatsapp { background: #25d366; color: #062c17; border: 0; }
.btn-whatsapp:hover { background: #1fbe59; }

.ref-qr-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 14px; padding: 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
}
.ref-qr-copy h2 { margin: 0 0 6px; font-size: 17px; }
.ref-qr-copy p { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); }
.ref-qr-assets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ref-qr-assets .btn { min-height: 38px; font-size: 12px; }
.ref-qr-image {
  flex: none; width: 168px; padding: 12px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); text-align: center;
  font-size: 11px; color: #5b7066;
}
.ref-qr-image svg { display: block; width: 100%; height: auto; margin: 0 auto; }
@media (max-width: 640px) {
  .ref-qr-card { flex-direction: column; align-items: stretch; text-align: center; }
  .ref-qr-copy p { text-align: center; }
  .ref-qr-image { margin: 0 auto; }
}

.ref-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 16px 0;
}
.ref-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; display: flex; flex-direction: column; gap: 3px;
}
.ref-stat b { font-size: 26px; line-height: 1.1; color: var(--brand-text); }
.ref-stat span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ref-stat small { font-size: 11px; color: var(--ink-3, var(--ink-2)); }

.ref-dashboard h2, .admin-panel[data-panel="referrals"] h4 {
  margin: 26px 0 10px; font-size: 17px;
}
.ref-vouchers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ref-voucher-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ref-voucher-days { font-size: 24px; font-weight: 800; color: var(--brand-text); }
.ref-voucher small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12px; }
.ref-voucher-use { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ref-voucher-use select, .ref-admin-grid input, .ref-setting input, .ref-setting select {
  flex: 1 1 150px; min-width: 0; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit;
}
.ref-voucher.exhausted, .ref-voucher.expired, .ref-voucher.revoked { opacity: .62; }

.ref-pill {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.ref-rewards { display: grid; gap: 8px; }
.ref-reward {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
}
.ref-reward b { flex: 1 1 120px; }
.ref-reward span { font-size: 12px; color: var(--ink-2); }

.admin-panel[data-panel="referrals"] { grid-column: 1 / -1; margin-top: 12px; }
.admin-panel[data-panel="referrals"] h3 { margin: 0 0 12px; font-size: 18px; }
.ref-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ref-admin-settings, .ref-admin-grant {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--surface-2);
}
.ref-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; font-size: 13px; }
.ref-setting span { color: var(--ink-2); }
.ref-setting input, .ref-setting select { flex: 0 0 120px; }
.ref-admin-grant { display: flex; flex-direction: column; gap: 8px; }
.ref-admin-grant input { width: 100%; }
.ref-admin-list { display: grid; gap: 8px; }

/* Gratis-TOP im Feed deutlich, aber dezent kennzeichnen */
.meta-top.sponsored.free-top {
  background: var(--brand-soft); color: var(--brand-text);
  border: 1px solid var(--brand-soft-2);
}

@media (max-width: 640px) {
  .ref-page { padding: 12px 10px 40px; }
  .ref-hero { padding: 22px 18px; border-radius: 18px; }
  .ref-link-row { flex-direction: column; }
  .ref-link-row input { width: 100%; }
  .ref-share .btn { flex: 1 1 100%; }
  .ref-setting { flex-direction: column; align-items: stretch; }
  .ref-setting input, .ref-setting select { flex: 1 1 auto; width: 100%; }
}
