/* Mehndisathi V337 referral points: shared registration, member, and admin surfaces. */
.referral-register-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  margin: 4px 0 18px;
  padding: 14px;
  border: 1px solid #e5b85d;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8df 0%, #fffdf7 60%, #f7fff9 100%);
  box-shadow: 0 12px 28px rgb(117 68 8 / 8%);
}
.referral-register-gift {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #a90c18;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(169 12 24 / 12%);
}
.referral-register-gift svg { width: 27px; height: 27px; }
.referral-register-card label { min-width: 0; margin: 0; }
.referral-register-card label small { margin-left: 7px; color: #755b4d; font-weight: 600; }
.referral-register-card input { margin-top: 7px; text-transform: uppercase; letter-spacing: .09em; }
.referral-register-card > p { grid-column: 2; margin: 0; color: #634b3c; font-size: .82rem; line-height: 1.45; }

.referral-home-strip {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 28px;
  gap: 13px;
  align-items: center;
  margin: 0 0 16px;
  padding: 13px 15px;
  color: #24100e;
  text-decoration: none;
  border: 1px solid #dda943;
  border-radius: 17px;
  background: linear-gradient(105deg, #fff0bb 0%, #fff9df 48%, #effaf4 100%);
  box-shadow: 0 12px 30px rgb(126 73 9 / 9%);
}
.referral-home-strip:hover { transform: translateY(-1px); box-shadow: 0 15px 34px rgb(126 73 9 / 14%); }
.referral-home-strip.is-award { border-color: #0d8b52; background: linear-gradient(105deg, #dcf7e9 0%, #fff6c9 52%, #ffe3e7 100%); box-shadow: 0 15px 36px rgb(8 117 68 / 15%); }
.referral-home-gift { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #a90c18; font-size: 1.45rem; }
.referral-home-strip span:nth-child(2) { min-width: 0; }
.referral-home-strip small { display: block; color: #a90c18; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.referral-home-strip strong { display: block; margin-top: 2px; line-height: 1.35; }
.referral-home-strip > b { white-space: nowrap; color: #09693e; padding: 8px 11px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgb(9 105 62 / 15%); }
.referral-home-strip > i { color: #a90c18; font-size: 1.35rem; font-style: normal; }

.referral-dashboard-v337 .dashboard-main { min-width: 0; }
.referral-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 34px);
  color: #fff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 20%, rgb(255 211 96 / 38%) 0 6%, transparent 6.5%),
    linear-gradient(130deg, #8f0712 0%, #b80e1d 60%, #7d0710 100%);
  box-shadow: 0 22px 45px rgb(112 5 14 / 18%);
}
.referral-page-head .eyebrow { color: #ffd875; }
.referral-page-head h1 { margin: 3px 0 7px; color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.75rem); line-height: 1.04; }
.referral-page-head p:last-child { max-width: 760px; margin: 0; color: #fff8ef; line-height: 1.55; }
.referral-balance { min-width: 175px; padding: 15px 18px; text-align: right; border: 1px solid rgb(255 255 255 / 32%); border-radius: 18px; background: rgb(255 255 255 / 12%); backdrop-filter: blur(8px); }
.referral-balance small, .referral-balance span { display: block; color: #fff3dc; }
.referral-balance strong { display: block; color: #ffd875; font-size: 2.25rem; line-height: 1; }

.referral-hero-card {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid #e2bd68;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 45px rgb(72 42 24 / 10%);
}
.referral-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 350px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgb(255 255 255 / 95%) 0 18%, transparent 18.5%),
    radial-gradient(circle at 18% 20%, #f8d764 0 4px, transparent 5px),
    radial-gradient(circle at 83% 72%, #159257 0 5px, transparent 6px),
    linear-gradient(150deg, #fff3b9 0%, #ffe3c9 53%, #f8d9df 100%);
}
.referral-hero-visual::after { content: ''; position: absolute; width: 260px; height: 260px; border: 42px solid rgb(255 255 255 / 36%); border-radius: 50%; }
.referral-gift-box { position: relative; z-index: 2; display: grid; place-items: center; width: 150px; height: 122px; color: #fff; border-radius: 16px 16px 24px 24px; background: linear-gradient(135deg, #b50918, #870811); box-shadow: 0 24px 40px rgb(122 6 16 / 26%); transform: rotate(-2deg); }
.referral-gift-box::before { content: ''; position: absolute; inset: -24px -8px auto; height: 32px; border-radius: 12px; background: #c59416; box-shadow: 0 8px 0 #f4d36c; }
.referral-gift-box::after { content: ''; position: absolute; top: -64px; left: 50%; width: 52px; height: 44px; border: 11px solid #c59416; border-radius: 50% 50% 10px 10px; transform: translateX(-50%) rotate(-8deg); }
.referral-gift-box i { position: absolute; inset: -24px auto 0; width: 22px; background: #edc452; }
.referral-gift-box b { position: relative; z-index: 1; font-size: 2.6rem; line-height: 1; }
.referral-gift-box small { position: relative; z-index: 1; font-weight: 900; letter-spacing: .16em; }
.referral-confetti { position: absolute; z-index: 3; width: 12px; height: 32px; border-radius: 6px; background: #b30b18; transform: rotate(25deg); }
.referral-confetti.c1 { top: 18%; left: 22%; }.referral-confetti.c2 { top: 24%; right: 18%; background: #148a54; transform: rotate(-32deg); }.referral-confetti.c3 { bottom: 17%; left: 16%; background: #cd9a14; transform: rotate(55deg); }.referral-confetti.c4 { right: 15%; bottom: 18%; height: 15px; transform: rotate(20deg); }
.referral-hero-copy { align-self: center; padding: clamp(22px, 4vw, 48px); min-width: 0; }
.referral-hero-copy h2 { margin: 4px 0 10px; font-size: clamp(1.45rem, 2.7vw, 2.25rem); }
.referral-hero-copy > p:not(.eyebrow, .referral-copy-status) { max-width: 700px; color: #604b42; line-height: 1.55; }
.referral-code-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 22px 0 14px; overflow: hidden; border: 2px dashed #c78b16; border-radius: 15px; background: #fff9e7; }
.referral-code-box span { align-self: center; padding: 14px 17px; color: #8e0712; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.15rem, 3vw, 1.55rem); font-weight: 900; letter-spacing: .1em; }
.referral-code-box button { border: 0; padding: 0 18px; color: #fff; font-weight: 900; background: #8e0712; cursor: pointer; }
.referral-share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.referral-share-actions .button { min-height: 46px; }
.referral-share-actions .referral-whatsapp { background: #11854f; border-color: #11854f; }
.referral-copy-status { min-height: 1.3em; margin: 9px 0 0; color: #087344; font-size: .85rem; font-weight: 800; }

.referral-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.referral-steps article { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 11px; align-items: start; min-width: 0; padding: 17px; border: 1px solid #e9cfa3; border-radius: 18px; background: #fffaf1; }
.referral-steps article:nth-child(2) { border-color: #badcca; background: #f2fcf6; }
.referral-steps article:nth-child(3) { border-color: #c9d9ef; background: #f5f9ff; }
.referral-steps article:nth-child(4) { border-color: #e6b3b9; background: #fff3f4; }
.referral-steps article > span { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; border-radius: 13px; background: #a90c18; font-weight: 900; }
.referral-steps article:nth-child(2) > span { background: #087747; }.referral-steps article:nth-child(3) > span { background: #235f9f; }.referral-steps article:nth-child(4) > span { background: #c88f12; }
.referral-steps strong { display: block; margin: 1px 0 4px; }
.referral-steps p { margin: 0; color: #655247; font-size: .84rem; line-height: 1.45; }

.referral-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.referral-status-grid article { padding: 18px; border: 1px solid #e6d4c8; border-radius: 18px; background: #fff; box-shadow: 0 10px 25px rgb(50 31 20 / 6%); }
.referral-status-grid article:nth-child(2) { border-color: #b8dcc9; }.referral-status-grid article:nth-child(3) { border-color: #e0bd65; background: #fffaf0; }
.referral-status-grid small, .referral-status-grid span { display: block; color: #685449; }
.referral-status-grid strong { display: block; margin: 4px 0; color: #a90c18; font-size: 2rem; }
.referral-history { margin-bottom: 14px; }
.referral-history-list { display: grid; gap: 8px; }
.referral-history-list article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid #eadbd1; border-radius: 14px; background: #fffdfb; }
.referral-history-avatar { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; border-radius: 50%; background: #a90c18; font-weight: 900; }
.referral-history-list small { display: block; margin-top: 3px; color: #6c574c; }
.referral-history-list b { color: #8b5b06; padding: 7px 9px; border-radius: 999px; background: #fff2c8; font-size: .8rem; }
.referral-history-list b.is-qualified { color: #07633b; background: #dff5e9; }
.referral-empty { display: flex; gap: 13px; align-items: center; padding: 20px; border-radius: 15px; background: #fff8ea; }
.referral-empty > span { color: #a90c18; font-size: 2rem; }.referral-empty p { margin: 3px 0 0; }
.referral-terms-note { display: flex; gap: 10px; padding: 13px 15px; color: #53443d; border: 1px solid #dacbc2; border-radius: 14px; background: #faf8f6; font-size: .82rem; line-height: 1.45; }
.referral-terms-note strong { flex: 0 0 auto; color: #8f0712; }
.referral-locked-card { display: flex; gap: 15px; align-items: center; }.referral-locked-card > span { font-size: 2rem; }.referral-locked-card > div { flex: 1; }.referral-locked-card h2, .referral-locked-card p { margin: 0; }.referral-locked-card p { margin-top: 4px; }

.referral-gift-dialog { width: min(92vw, 510px); padding: 0; color: #251513; border: 0; border-radius: 26px; background: transparent; box-shadow: 0 30px 80px rgb(37 5 9 / 38%); }
.referral-gift-dialog::backdrop { background: rgb(36 13 12 / 72%); backdrop-filter: blur(5px); }
.referral-gift-dialog form { display: grid; justify-items: center; padding: 34px 28px 27px; text-align: center; border: 2px solid #edc252; border-radius: 26px; background: radial-gradient(circle at top, #fff5c9, #fff 55%); }
.referral-gift-dialog h2 { margin: 5px 0 8px; color: #a90c18; font-size: 2rem; }.referral-gift-dialog p:not(.eyebrow) { max-width: 400px; margin: 0 0 19px; line-height: 1.5; }.referral-gift-dialog small { margin-top: 12px; color: #6a554b; }
.referral-gift-burst { position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin-bottom: 10px; border-radius: 50%; background: #a90c18; box-shadow: 0 0 0 12px #f4d36c, 0 0 0 24px rgb(244 211 108 / 30%); }
.referral-gift-burst span { position: relative; z-index: 2; font-size: 3.4rem; animation: referralGiftBounce .85s ease-out both; }
@keyframes referralGiftBounce { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 65% { transform: scale(1.18) rotate(7deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

.admin-referral-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-referral-ledger { overflow-x: auto; }
.admin-referral-ledger table { min-width: 860px; }
.admin-referral-ledger .referral-admin-qualified { color: #087344; font-weight: 900; }

@media (max-width: 1050px) {
  .referral-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-referral-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .referral-page-head { grid-template-columns: 1fr; padding: 20px; border-radius: 20px; }
  .referral-balance { min-width: 0; text-align: left; }
  .referral-hero-card { grid-template-columns: 1fr; border-radius: 20px; }
  .referral-hero-visual { min-height: 245px; }
  .referral-hero-copy { padding: 21px 17px 23px; }
  .referral-steps { grid-template-columns: 1fr; }
  .referral-status-grid { grid-template-columns: 1fr; }
  .referral-history-list article { grid-template-columns: 42px minmax(0, 1fr); }
  .referral-history-list b { grid-column: 2; justify-self: start; }
  .referral-terms-note { display: grid; }
  .referral-home-strip { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 11px; }
  .referral-home-gift { width: 42px; height: 42px; }
  .referral-home-strip > b { grid-column: 2; justify-self: start; }
  .referral-home-strip > i { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 480px) {
  .referral-register-card { grid-template-columns: 42px minmax(0, 1fr); padding: 12px; }
  .referral-register-gift { width: 42px; height: 42px; }
  .referral-code-box { grid-template-columns: 1fr; }
  .referral-code-box button { min-height: 43px; }
  .referral-share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .referral-share-actions .button:first-child { grid-column: 1 / -1; }
  .referral-gift-box { transform: scale(.88) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .referral-gift-burst span { animation: none; }
  .referral-home-strip:hover { transform: none; }
}
