/* Refer & Earn Page — tiffin web app */
*{box-sizing:border-box;margin:0;padding:0}
body{background:#f7f6f8;font-family:'Inter',sans-serif;color:#111827;min-height:100vh}
:root{--primary:#4A1594;--primary-dark:#380f73;--text:#111827;--muted:#6b7280;--border:#e8e8e8;--radius:16px}
.top-bar{background:#fff;display:flex;align-items:center;padding:0 6px;height:56px;border-bottom:1px solid #f0f0f0;position:sticky;top:0;z-index:100}
.top-back{width:48px;height:48px;border:none;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;flex-shrink:0}
.top-back:hover{background:#f1f5f9}
.top-title{flex:1;text-align:center;font-size:18px;font-weight:700;color:var(--text)}
.top-spacer{width:48px;flex-shrink:0}
.wrap{max-width:560px;margin:0 auto;padding-bottom:40px}
.loader{display:flex;justify-content:center;padding:80px 0}
.spin{width:30px;height:30px;border:3px solid #e8e0f5;border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.hero{background:linear-gradient(145deg,#4A1594 0%,#7c3aed 100%);padding:36px 24px 40px;text-align:center;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;top:-40px;right:-40px;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.07)}
.hero::after{content:'';position:absolute;bottom:-50px;left:-30px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.05)}
.hero-icon{width:90px;height:90px;background:rgba(255,255,255,.15);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 18px;position:relative;z-index:1}
.hero-title{font-size:26px;font-weight:800;color:#fff;margin-bottom:8px;position:relative;z-index:1}
.hero-sub{font-size:14px;color:rgba(255,255,255,.8);line-height:1.6;max-width:300px;margin:0 auto;position:relative;z-index:1}
.code-section{background:#fff;margin:0 16px;margin-top:-20px;border-radius:var(--radius);padding:20px;box-shadow:0 4px 20px rgba(74,21,148,.12);position:relative;z-index:2}
.code-label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;margin-bottom:10px;text-align:center}
.code-row{display:flex;align-items:center;gap:10px;background:#f3edff;border-radius:12px;padding:14px 16px;border:2px dashed #c4a8f0}
.code-text{flex:1;font-size:22px;font-weight:800;color:var(--primary);letter-spacing:3px;text-align:center;font-variant-numeric:tabular-nums}
.copy-btn{width:40px;height:40px;background:var(--primary);border:none;border-radius:10px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s}
.copy-btn:hover{background:var(--primary-dark)}
.copy-hint{font-size:12px;color:var(--muted);text-align:center;margin-top:10px}
.rewards-strip{display:flex;gap:12px;margin:16px 16px 0;padding:0}
.reward-card{flex:1;background:#fff;border-radius:14px;border:1px solid var(--border);padding:16px 12px;text-align:center}
.reward-icon{width:44px;height:44px;border-radius:50%;background:#f3edff;display:flex;align-items:center;justify-content:center;margin:0 auto 10px}
.reward-amount{font-size:22px;font-weight:800;color:var(--primary);margin-bottom:4px}
.reward-desc{font-size:12px;color:var(--muted);line-height:1.4}
.section{margin:16px 16px 0}
.section-title{font-size:16px;font-weight:700;color:var(--text);margin-bottom:14px}
.step-list{display:flex;flex-direction:column;gap:0}
.step{display:flex;gap:14px;align-items:flex-start;position:relative;padding-bottom:20px}
.step:last-child{padding-bottom:0}
.step:not(:last-child)::after{content:'';position:absolute;left:21px;top:44px;width:2px;bottom:0;background:#e8e0f5}
.step-num{width:44px;height:44px;border-radius:50%;background:var(--primary);color:#fff;font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;z-index:1}
.step-content{flex:1;padding-top:10px}
.step-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px}
.step-desc{font-size:13px;color:var(--muted);line-height:1.5}
.share-section{margin:16px 16px 0}
.share-row{display:flex;gap:10px}
.share-btn{flex:1;height:52px;border:none;border-radius:14px;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:background .15s}
.share-btn.whatsapp{background:#25d366;color:#fff}
.share-btn.whatsapp:hover{background:#1ebe5d}
.share-btn.copy-all{background:#f3edff;color:var(--primary);border:1.5px solid #c4a8f0}
.share-btn.copy-all:hover{background:#e9e0f8}
.tnc{margin:16px 16px 0;font-size:12px;color:#aaa;text-align:center;line-height:1.6}
.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);font-size:13px;font-weight:500;padding:11px 22px;border-radius:24px;z-index:700;white-space:nowrap;opacity:0;transition:opacity .2s;pointer-events:none}
.toast.show{opacity:1}
.toast.success{background:#166534;color:#fff}
.toast.info{background:#1e3a5f;color:#fff}
