/* ================= Affiliate page (visitor landing + dashboard) ================= */
body.aff-page{background:radial-gradient(700px 420px at 100% 40%,rgba(60,120,255,.14),transparent 70%),linear-gradient(#eaf1ff,#f2f6ff 40%,#f6f9ff);background-attachment:scroll}
[hidden]{display:none!important}

/* dark header over the hero (same as the courses page) */
.header.dark{position:relative;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:1px solid rgba(255,255,255,.08)}
.header.dark .wordmark{color:#fff}.header.dark .wordmark b{color:#3d8bff}
.header.dark .nav{color:#fff}.header.dark .menu-btn{color:#fff}
.header.dark .nav a.active{padding:8px 20px;border-radius:14px;color:#fff;background:linear-gradient(180deg,#2d63f2,#1239c0)}
.header.dark .nav a.active::after{display:none}
@media (max-width:1080px){.header.dark .nav{color:var(--navy)}.header.dark .nav a.active{padding:14px 0;border-radius:0;background:none;color:var(--blue)}.header.dark .nav-cta-mobile{color:#fff}}

/* hero */
.af-top{position:relative;overflow:hidden;padding-bottom:110px;background:
  radial-gradient(430px 430px at -4% 70%,rgba(32,214,255,.8),rgba(20,140,255,.3) 48%,transparent 72%),
  radial-gradient(900px 520px at 80% -10%,rgba(48,110,255,.38),transparent 70%),
  linear-gradient(180deg,#030c33 0%,#05206a 55%,#0a3cc0 100%)}
.af-top::after{content:"";position:absolute;inset-inline:0;bottom:0;height:130px;background:linear-gradient(to bottom,rgba(234,241,255,0),#eaf1ff 92%);pointer-events:none}
.c-eyebrow{display:inline-flex;align-items:center;gap:12px;padding:10px 22px;border-radius:40px;font-weight:800;font-size:17px;color:#fff;background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.04));border:1px solid rgba(255,255,255,.22)}
.c-eyebrow svg{width:24px;height:24px;fill:#ffc928}
.af-hero{position:relative;z-index:1;display:grid;grid-template-columns:1.1fr .9fr;gap:34px;align-items:center;padding-top:34px}
.af-hero h1,.af-hero-dash h2{margin-top:20px;font-size:46px;line-height:1.35;font-weight:900;color:#fff;letter-spacing:0}
.pill{direction:ltr;unicode-bidi:isolate;display:inline-block;padding:0 16px;border-radius:40px;color:#0b1a4f;background:linear-gradient(180deg,#ffd84a,#ffb300);box-shadow:0 10px 22px -10px rgba(255,179,0,.9);font-weight:900;white-space:nowrap}
.af-hero p{margin-top:14px;max-width:560px;font-size:19px;line-height:1.8;font-weight:500;color:#cfe0ff}
.af-points{list-style:none;margin-top:18px;display:grid;gap:10px}
.af-points li{display:flex;align-items:center;gap:12px;font-weight:700;font-size:18px;color:#fff}
.af-points svg{width:28px;height:28px;flex:none}.af-points circle{fill:#2d73ff}.af-points path{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}

/* sign-up / login card */
.af-auth{padding:26px 26px 22px;border-radius:28px;background:#fff;color:var(--navy);box-shadow:0 40px 70px -30px rgba(0,10,80,.7),0 0 0 1px rgba(255,255,255,.6)}
.af-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;border-radius:16px;background:#eef3ff;margin-bottom:16px}
.af-tabs button{height:44px;border:0;border-radius:12px;cursor:pointer;font-family:inherit;font-weight:800;font-size:16px;color:var(--muted);background:none}
.af-tabs button.on{color:#fff;background:linear-gradient(180deg,#2d63f2,#1239c0);box-shadow:0 8px 16px -8px rgba(28,82,232,.8)}
.af-auth form,.af-dlg,.af-card form{display:grid;gap:14px}
label{display:grid;gap:6px;font-weight:700;font-size:15px}
.af-auth input,.af-dlg input,.af-card input:not([readonly]):not(.nostyle){height:50px;border-radius:14px;border:2px solid #d5e0fa;background:#f7f9ff;padding:0 14px;font-family:inherit;font-size:16px;color:var(--navy);outline:0;width:100%}
.af-auth input:focus,.af-dlg input:focus,.af-card input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(28,82,232,.12)}
.mode-login .only-register{display:none}
.af-go{height:54px;border:0;border-radius:15px;cursor:pointer;font-family:inherit;font-weight:900;font-size:18px;color:#fff;background:linear-gradient(180deg,#2d6bf5,#1239c0);box-shadow:0 16px 26px -12px rgba(18,57,192,.85),inset 0 1px 0 rgba(255,255,255,.35);transition:transform .2s}
.af-go:hover{transform:translateY(-2px)}.af-go[disabled]{opacity:.65;cursor:wait}
.af-err{min-height:22px;font-size:14.5px;font-weight:700;color:#d92d20;line-height:1.5}
.af-err.ok{color:#0c7a3d}
.af-hero .af-auth .af-note{max-width:none;margin:0;font-size:13.5px;color:#5a6a96;font-weight:600;line-height:1.7;text-align:center}
.af-note{font-size:13.5px;color:var(--muted);font-weight:600;line-height:1.7;text-align:center}.af-note a{color:var(--blue);font-weight:800}

/* dashboard hero */
.af-hero-dash{display:block;padding-top:26px}
.af-dash-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.af-hero-dash h2{font-size:38px}
.af-head-btns{display:flex;gap:8px;flex-wrap:wrap}
.af-ghost{height:42px;padding:0 16px;border-radius:12px;cursor:pointer;font-family:inherit;font-weight:700;font-size:14.5px;color:#fff;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.28)}
.af-ghost:hover{background:rgba(255,255,255,.18)}
.af-how{margin-top:22px;border-radius:20px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.18);overflow:hidden}
.af-how summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;padding:14px 20px;font-weight:800;font-size:18px;color:#fff}
.af-how summary::-webkit-details-marker{display:none}
.af-how summary::after{content:"▾";transition:transform .2s;color:#b9d0ff}.af-how[open] summary::after{transform:rotate(180deg)}
.af-how .bulb{margin-inline-start:auto;margin-inline-end:14px}
.af-how ol{list-style:none;display:grid;gap:12px;padding:6px 20px 18px}
.af-how li{display:flex;align-items:center;gap:12px;font-size:16.5px;font-weight:600;color:#e3ecff;line-height:1.7}
.af-how li i{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:900;font-size:14px;color:#fff;background:linear-gradient(180deg,#6a63ff,#4338d6)}

/* main */
.af-main{position:relative;z-index:2;margin-top:-62px;padding-bottom:70px}
.af-sec{padding-top:34px}
.af-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.af-stat{padding:18px 16px;border-radius:20px;text-align:center;background:#fff;box-shadow:0 16px 34px -24px rgba(20,60,170,.6),0 0 0 1px rgba(255,255,255,.9)}
.af-stat .ico{font-size:22px;line-height:1}
.af-stat strong{display:block;margin-top:6px;font-size:32px;font-weight:900;line-height:1.2;color:var(--blue)}
.af-stat strong small{font-size:14px;font-weight:800;color:var(--muted);margin-inline-start:4px}
.af-stat span{display:block;margin-top:2px;font-size:14.5px;font-weight:700;color:var(--muted)}
.af-stat.good{background:linear-gradient(180deg,#f0fbf4,#e2f7ea)}.af-stat.good strong{color:#0c7a3d}
.af-stat.warn strong{color:#d97706}

.af-card{margin-top:16px;padding:24px;border-radius:26px;background:#fff;box-shadow:0 22px 44px -30px rgba(20,60,170,.6),0 0 0 1px rgba(255,255,255,.9)}
.af-card h2{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:900;margin-bottom:14px;color:var(--navy)}
.af-card h2 svg{width:26px;height:26px;fill:none;stroke:var(--blue);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.af-card h2 small{margin-inline-start:auto;font-size:14px;font-weight:700;color:var(--muted)}
.lbl{display:block;margin:14px 0 8px;font-weight:700;font-size:14.5px;color:#33407a}.lbl small{font-weight:600;color:var(--muted)}
.lbl code{font-family:Poppins,sans-serif;background:#eef3ff;color:var(--blue);padding:1px 8px;border-radius:6px;font-size:13px}
.af-copy{display:flex;gap:8px;align-items:stretch;margin-top:4px}
.af-copy input[readonly]{flex:1;min-width:0;height:50px;min-height:50px;border-radius:14px;border:2px solid #c9c4fb;background:#f1efff;padding:0 14px;font-family:Poppins,monospace;font-size:14.5px;font-weight:600;color:#3a2fb0;outline:0}
.af-copy.custom{align-items:center;border:2px solid #d5e0fa;border-radius:14px;background:#f7f9ff;padding:0 0 0 0;overflow:hidden}
.af-copy.custom .pre{padding:0 12px;font-family:Poppins,sans-serif;font-size:13.5px;color:var(--muted);white-space:nowrap;font-weight:600}
.af-copy.custom{direction:rtl}
.af-copy.custom .pre{border-inline-end:2px solid #d5e0fa;background:#eef3ff;align-self:stretch;display:flex;align-items:center;color:#3a4b86}
.af-copy.custom input{flex:1;min-width:60px;height:46px!important;border:0!important;background:none!important;box-shadow:none!important;border-radius:0!important;padding:0 12px!important;font-family:Poppins,sans-serif!important;text-align:right}
.af-btn{flex:none;min-width:92px;height:50px;padding:0 20px;border:0;border-radius:13px;cursor:pointer;font-family:inherit;font-weight:800;font-size:15.5px;color:#fff;background:linear-gradient(180deg,#2d6bf5,#1239c0)}
.af-btn.alt{height:46px;border-radius:0;background:linear-gradient(180deg,#2d6bf5,#1239c0)}
.af-btn:hover{filter:brightness(1.08)}

.af-cols>*,.af-main .container>*{min-width:0}
.af-main{overflow-x:clip}
.af-cols{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:16px;align-items:start}
.tbl-wrap{overflow-x:auto}
.af-tbl{width:100%;border-collapse:collapse;font-size:14.5px}
.af-tbl th{text-align:right;padding:10px 8px;background:#f1f5ff;color:#4a5a86;font-size:13px;font-weight:800;white-space:nowrap}
.af-tbl th:first-child{border-radius:0 10px 10px 0}.af-tbl th:last-child{border-radius:10px 0 0 10px}
.af-tbl td{padding:11px 8px;border-bottom:1px solid #eef2fb;font-weight:600;color:#26345f;white-space:nowrap}
.af-tbl tr:last-child td{border-bottom:0}
.af-tbl .mono{font-family:Poppins,monospace;font-size:13px;direction:ltr;display:inline-block}
.af-tbl .src{display:inline-block;padding:2px 10px;border-radius:20px;background:#eef3ff;color:#3a4b86;font-size:12.5px;font-weight:700}
.af-tbl .empty{text-align:center;color:var(--muted);padding:30px 10px;white-space:normal;line-height:1.8}
.af-pager{display:flex;justify-content:center;gap:6px;margin-top:14px;flex-wrap:wrap}
.af-pager button{min-width:36px;height:36px;padding:0 8px;border-radius:10px;border:1.5px solid #e1e8fb;background:#fff;cursor:pointer;font-family:Poppins,sans-serif;font-weight:700;font-size:14px;color:var(--navy)}
.af-pager button.on{background:var(--blue);border-color:var(--blue);color:#fff}.af-pager button:disabled{opacity:.4;cursor:default}
.af-pager span{align-self:center;color:var(--muted)}

/* withdraw */
.af-bal{padding:12px 14px;border-radius:14px;font-weight:700;font-size:15px;line-height:1.7;margin-bottom:14px}
.af-bal.ok{background:#eaf8ef;color:#14532d;border:1px solid #bfe8cd}.af-bal.no{background:#fff6e8;color:#7a4a05;border:1px solid #fbd9a0}
.af-card form small{font-weight:600;color:var(--muted);font-size:13px}
.af-hist{margin-top:18px;display:grid;gap:8px}
.af-hist h3{font-size:15px;font-weight:800;color:var(--muted)}
.af-hist .row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#f5f8ff;font-weight:700;font-size:14.5px}
.af-hist .st{padding:3px 12px;border-radius:20px;font-size:12.5px;font-weight:800}
.st-pending{background:#fff1d6;color:#9a5b00}.st-paid{background:#dcf6e5;color:#0c7a3d}.st-rejected{background:#fde6e3;color:#b42318}

/* landing sections */
.af-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:6px}
.af-steps article{position:relative;padding:34px 18px 22px;border-radius:24px;text-align:center;background:linear-gradient(#fff,#f1f6ff);border:2px solid #c9d9fb;box-shadow:0 18px 34px -22px rgba(28,82,232,.45)}
.af-steps .n{position:absolute;top:-22px;inset-inline-end:16px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:900;font-size:22px;background:linear-gradient(180deg,#2d63f2,#1239c0);border:4px solid #fff;box-shadow:0 8px 18px -6px rgba(28,82,232,.6)}
.af-steps img{height:72px;width:auto;margin:0 auto 10px;object-fit:contain}
.af-steps h3{font-size:21px;font-weight:900;margin-bottom:6px}
.af-steps p{font-size:15.5px;font-weight:600;color:#33415f;line-height:1.7}
.af-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.af-benefits div{padding:22px 14px;border-radius:22px;text-align:center;color:#fff;background:linear-gradient(135deg,#1c52e8,#0f2fa0);box-shadow:0 22px 40px -26px rgba(28,82,232,.9)}
.af-benefits b{direction:ltr;display:block;font-size:34px;font-weight:900;color:#ffd84a;line-height:1.2}
.af-benefits span{display:block;margin-top:4px;font-size:15px;font-weight:700;color:#dbe7ff;line-height:1.6}

/* dialogs */
.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px;overflow-y:auto}
.modal-backdrop{position:fixed;inset:0;background:rgba(4,10,40,.78);backdrop-filter:blur(4px)}
.af-dlg{position:relative;width:min(440px,100%);padding:28px 24px 24px;border-radius:26px;background:#fff;color:var(--navy);box-shadow:0 40px 90px -20px rgba(0,0,0,.6)}
.af-dlg.wide{width:min(820px,100%)}
.af-dlg h2{font-size:24px;font-weight:900}.dim{color:var(--muted);font-weight:600}
.af-x{position:absolute;top:12px;left:12px;width:40px;height:40px;border:0;border-radius:50%;cursor:pointer;background:#eef3ff;color:#33407a;font-size:16px}
.toast{position:fixed;z-index:200;bottom:24px;inset-inline:0;margin:auto;width:max-content;max-width:calc(100% - 32px);padding:14px 26px;border-radius:50px;background:#0c1a4b;color:#fff;font-weight:800;font-size:16px;box-shadow:0 20px 40px -12px rgba(0,0,0,.5)}
body.noscroll{overflow:hidden}

/* daily tip popup */
.tip-card{position:relative;width:min(460px,100%);padding:22px 24px 22px;border-radius:30px;color:#fff;overflow:hidden;text-align:center;animation:tipPop .28s cubic-bezier(.2,.9,.3,1.2);
  background:radial-gradient(120% 70% at 85% 0%,rgba(80,140,255,.55),transparent 65%),radial-gradient(90% 60% at 0% 100%,rgba(32,214,255,.3),transparent 70%),linear-gradient(165deg,#0f3bb8,#071f69 70%);
  box-shadow:0 0 0 2px rgba(255,255,255,.18),0 50px 100px -24px rgba(0,0,0,.75)}
@keyframes tipPop{from{opacity:0;transform:translateY(18px) scale(.94)}}
.tip-x{position:absolute;top:14px;left:14px;width:38px;height:38px;border:0;border-radius:50%;cursor:pointer;background:rgba(255,255,255,.14);color:#fff;font-size:15px}
.tip-x:hover{background:rgba(255,255,255,.25)}
.tip-top{display:flex;justify-content:flex-start;align-items:center;gap:12px;margin:0 0 6px;min-height:38px;padding-inline-end:0}
.tip-badge{padding:6px 16px;border-radius:30px;font-weight:800;font-size:14px;color:#0b1a4f;background:linear-gradient(180deg,#ffd84a,#ffb300)}
.tip-count{font-family:Poppins,sans-serif;font-weight:600;font-size:14px;color:#b9d0ff;direction:ltr}
.tip-body{padding:6px 4px 4px}
.tip-body.slide-next{animation:tipNext .32s ease-out}.tip-body.slide-prev{animation:tipPrev .32s ease-out}
@keyframes tipNext{from{opacity:0;transform:translateX(-26px)}}
@keyframes tipPrev{from{opacity:0;transform:translateX(26px)}}
.tip-ic{width:84px;height:84px;margin:6px auto 12px;border-radius:26px;display:grid;place-items:center;font-size:44px;line-height:1;background:linear-gradient(160deg,rgba(255,255,255,.22),rgba(255,255,255,.06));border:1.5px solid rgba(255,255,255,.28);box-shadow:0 18px 30px -16px rgba(0,0,0,.6)}
.tip-card h2{font-size:25px;font-weight:900;line-height:1.4;margin-bottom:8px;color:#fff}
.tip-card p{font-size:17px;font-weight:500;line-height:1.95;color:#dbe7ff;min-height:128px}
.tip-dots{display:flex;justify-content:center;gap:6px;margin:10px 0 16px;flex-wrap:wrap}
.tip-dots i{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.28);transition:all .25s}
.tip-dots i.on{width:22px;border-radius:7px;background:#ffd84a}
.tip-actions{display:grid;grid-template-columns:52px 1fr;gap:10px}
.tip-actions button{height:52px;border:0;border-radius:16px;cursor:pointer;font-family:inherit;font-weight:900;display:inline-flex;align-items:center;justify-content:center;gap:10px;transition:transform .2s}
.tip-actions button:hover{transform:translateY(-2px)}
.tip-actions svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.tip-prev{background:rgba(255,255,255,.14);color:#fff}
.tip-next{font-size:18px;color:#0b1a4f;background:linear-gradient(180deg,#ffd84a,#ffb300);box-shadow:0 14px 24px -12px rgba(255,179,0,.8),inset 0 2px 0 rgba(255,255,255,.5)}
.tip-close{grid-column:1/-1;height:44px!important;background:none;color:#b9d0ff;font-size:15px}
.tip-close:hover{color:#fff}
@media (max-width:640px){.tip-card{padding:18px 16px 16px;border-radius:26px}.tip-card h2{font-size:22px}.tip-card p{font-size:15.5px;min-height:150px}.tip-ic{width:72px;height:72px;font-size:38px}}

@media (max-width:1000px){
  .af-hero{grid-template-columns:1fr}
  .af-hero h1,.af-hero-dash h2{font-size:36px}
  .af-cols{grid-template-columns:minmax(0,1fr)}
  .af-steps,.af-benefits{grid-template-columns:1fr 1fr}
  .af-steps{row-gap:30px}
}
@media (max-width:640px){
  .af-tbl th:nth-child(4),.af-tbl td:nth-child(4){display:none}
  .af-tbl{font-size:13px}.af-tbl td,.af-tbl th{padding:10px 5px}
  .af-top{padding-bottom:90px}
  .af-hero{padding-top:20px;gap:22px}
  .af-hero h1,.af-hero-dash h2{font-size:29px}.af-hero-dash h2{font-size:25px}
  .af-hero p{font-size:16px}.af-points li{font-size:15.5px}
  .af-auth{padding:20px 16px 18px;border-radius:24px}
  .af-stats{grid-template-columns:1fr 1fr}
  .af-stat strong{font-size:26px}
  .af-card{padding:18px 14px;border-radius:22px}
  .af-card h2{font-size:19px}
  /* phone: description first, then the link on its own full-width line, with the button underneath */
  .af-copy{flex-direction:column;align-items:stretch;gap:8px}
  .af-copy input[readonly]{flex:none;width:100%;height:48px;min-height:48px;font-size:13px;text-overflow:clip}
  .af-copy .af-btn,.af-copy.custom .af-btn{flex:none;width:100%;min-width:0;height:48px;border-radius:13px}
  .af-copy.custom{flex-direction:row;flex-wrap:wrap;gap:0;padding:0;overflow:hidden}
  .af-copy.custom .pre{flex:none;font-size:13px;padding:0 12px}
  .af-copy.custom input{flex:1;min-width:0;height:48px!important}
  .af-copy.custom .af-btn{flex:0 0 100%;border-radius:0 0 11px 11px}
  .lbl{line-height:1.7}.lbl small{display:block;margin-top:2px}
    .af-benefits b{font-size:26px}.af-benefits span{font-size:13.5px}
  .af-steps article{padding:32px 12px 18px}.af-steps h3{font-size:18px}.af-steps p{font-size:14px}
  .af-head-btns{width:100%}.af-ghost{flex:1;padding:0 8px;font-size:13.5px}
  .af-how li{font-size:15px}
}
