/* Portal Affiliate (tokenflow-portal-affiliate.js). Monochrome dark + luxurious blue; indigo only inside gradients, rims
   and glows; red/amber only for feedback text. One grid: gaps 8 / 12 / 16 / 24, panel padding 24 (16 on phones).
   Radii: panels 18, inner tiles 14, controls 12, chips and pills 999. Borders 1px. Buttons 40px (44px in dialogs). */
:root{--aff-b1:#36B8ED;--aff-b2:#1479B8;--aff-b3:#229ED9;--aff-soft:#d9f2ff;--aff-ice:#dff5ff;--aff-ind:#6C7BFF;
  --aff-line:rgba(255,255,255,.08);--aff-inner:rgba(0,0,0,.32);--aff-muted:#a3a9b1;--aff-body:#c9ced4;
  --aff-grad:linear-gradient(100deg,#fff 0%,#d9f2ff 32%,#36B8ED 68%,#6C7BFF 100%);
  --aff-btn:linear-gradient(135deg,#36B8ED,#1479B8)}
@property --aff-a{syntax:'<angle>';initial-value:0deg;inherits:false}

#affiliateSection{max-width:1000px;container-type:inline-size;container-name:aff}
.aff-stack{display:grid;gap:16px}
#affiliateSection .card.aff-panel{padding:24px;border-radius:18px}
#affiliateSection h2,#affiliateSection h3{color:#fff}

/* Labels, headings, text */
.aff-label{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--aff-b1);font-size:12px;font-weight:650;letter-spacing:.12em;line-height:1.4;text-transform:uppercase}
.aff-pulse{flex:none;width:6px;height:6px;border-radius:50%;background:var(--aff-b1);box-shadow:0 0 12px var(--aff-b1);animation:affPulse 2.4s ease-in-out infinite}
.aff-pulse.off{background:#6b6b6b;box-shadow:none;animation:none}
.aff-label:has(.aff-pulse.off){color:var(--aff-muted)}
@keyframes affPulse{50%{opacity:.35}}
.aff-grad{background:var(--aff-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.aff-subhead{margin:24px 0 12px;padding-top:20px;border-top:1px solid var(--aff-line);color:var(--aff-muted)!important;font-size:12px!important;font-weight:650;letter-spacing:.12em;text-transform:uppercase}
.aff-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin:0 0 16px}
#affiliateSection .aff-card-head h2{margin:0;font-size:16px;letter-spacing:-.02em}
.aff-card-note{color:var(--aff-muted);font-size:12px}

/* Buttons: one size inside the menu, blue gradient for the single primary action of a block. */
#affiliateSection .btn,.aff-dialog .btn{min-height:40px;padding:0 16px;border-radius:12px;font-size:13.5px;font-weight:650;gap:8px}
#affiliateSection .btn svg,.aff-dialog .btn svg{width:16px;height:16px;flex:none}
#affiliateSection .btn-primary,.aff-dialog .btn-primary{background:var(--aff-btn);border:1px solid rgba(54,184,237,.55);color:#fff;box-shadow:0 10px 28px -12px rgba(54,184,237,.85),inset 0 1px 0 rgba(255,255,255,.22)}
#affiliateSection .btn-primary:hover:not(:disabled),.aff-dialog .btn-primary:hover:not(:disabled){background:linear-gradient(135deg,#4cc4f2,#1a86c9);border-color:var(--aff-b1);color:#fff;box-shadow:0 14px 32px -12px rgba(54,184,237,1),inset 0 1px 0 rgba(255,255,255,.28)}
#affiliateSection .btn-primary:disabled,.aff-dialog .btn-primary:disabled{opacity:.42;cursor:not-allowed;box-shadow:none}
#affiliateSection .btn[aria-busy="true"]{cursor:wait}
.aff-wide{width:100%}

/* Spinning gradient rim: a 1.5px conic border around a solid inner panel. */
.aff-rim{position:relative;min-width:0;padding:1.5px;border-radius:20px;background:conic-gradient(from var(--aff-a),rgba(54,184,237,.95),rgba(108,123,255,.8) 18%,rgba(255,255,255,.06) 38%,rgba(255,255,255,.06) 62%,rgba(54,184,237,.95));animation:affSpin 9s linear infinite;box-shadow:0 30px 80px -44px rgba(54,184,237,.6)}
.aff-rim-inner{position:relative;isolation:isolate;height:100%;padding:24px;border-radius:18.5px;background:radial-gradient(120% 80% at 0% 0%,rgba(54,184,237,.08),transparent 60%),linear-gradient(180deg,#0b1016,#07090c);overflow:hidden}
@keyframes affSpin{to{--aff-a:360deg}}
.aff-orb{position:absolute;z-index:-2;width:380px;height:380px;border-radius:50%;filter:blur(90px);opacity:.22;pointer-events:none}
.aff-orb-a{top:-200px;right:-140px;background:var(--aff-b1)}
.aff-orb-b{bottom:-240px;left:-180px;background:var(--aff-ind);opacity:.18}
.aff-orb-link{top:-260px;left:-140px;background:var(--aff-b1);opacity:.14}

/* ---------- Join view ---------- */
#affiliateSection .aff-hero{overflow:hidden;padding:32px}
.aff-hero-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:32px;align-items:center}
#affiliateSection .aff-display{margin:0;font-size:38px;font-weight:720;line-height:1.1;letter-spacing:-.035em}
.aff-sub{max-width:46ch;margin:16px 0 24px;color:var(--aff-body);font-size:15px;line-height:1.65}
.aff-calc{padding:24px}
.aff-calc-title{margin:0 0 16px;color:#fff;font-size:15px;font-weight:650;letter-spacing:-.01em}
.aff-calc-field{display:grid;gap:8px;margin:0 0 16px}
.aff-calc-label,.aff-calc-row{color:var(--aff-muted);font-size:13px;line-height:1.4}
.aff-calc-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.aff-calc-row output{flex:none;color:#fff;font-weight:650;font-variant-numeric:tabular-nums}
.aff-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.aff-chip-btn{min-height:36px;padding:0 8px;border:1px solid var(--aff-line);border-radius:999px;background:rgba(255,255,255,.03);color:var(--aff-muted);font:650 13px/1 Geist,Inter,ui-sans-serif,system-ui,sans-serif;font-variant-numeric:tabular-nums;cursor:pointer;transition:background .2s,color .2s,border-color .2s,box-shadow .2s}
.aff-chip-btn:hover{color:#fff;border-color:rgba(54,184,237,.45)}
.aff-chip-btn[aria-pressed="true"]{color:#fff;border-color:transparent;background:var(--aff-btn);box-shadow:0 6px 22px -8px rgba(54,184,237,.75)}
.aff-chip-btn:focus-visible{outline:2px solid var(--aff-b1);outline-offset:2px}
.aff-range{--fill:50%;-webkit-appearance:none;appearance:none;width:100%;height:24px;margin:0;background:transparent;cursor:pointer}
.aff-range::-webkit-slider-runnable-track{height:6px;border-radius:99px;background:linear-gradient(90deg,var(--aff-b2),var(--aff-b1) var(--fill),rgba(255,255,255,.1) var(--fill))}
.aff-range::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;margin-top:-6px;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(54,184,237,.3),0 4px 12px rgba(0,0,0,.5);transition:box-shadow .2s}
.aff-range::-moz-range-track{height:6px;border-radius:99px;background:rgba(255,255,255,.1)}
.aff-range::-moz-range-progress{height:6px;border-radius:99px;background:linear-gradient(90deg,var(--aff-b2),var(--aff-b1))}
.aff-range::-moz-range-thumb{width:18px;height:18px;border:0;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(54,184,237,.3)}
.aff-range:focus{outline:none}.aff-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 5px rgba(54,184,237,.65)}.aff-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 5px rgba(54,184,237,.65)}
.aff-calc-result{display:grid;gap:4px;margin:24px 0 0;padding:16px 0 0;border-top:1px solid var(--aff-line)}
.aff-calc-big{display:block;font-size:44px;font-weight:720;line-height:1.1;letter-spacing:-.035em;font-variant-numeric:tabular-nums;white-space:nowrap}
.aff-calc-year{color:var(--aff-body);font-size:13px;font-variant-numeric:tabular-nums}.aff-calc-year span,.aff-nowrap{white-space:nowrap}
.aff-calc-note{margin:12px 0 0;color:#7f868f;font-size:12px;line-height:1.5}
.aff-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:32px 0 0;padding:0;list-style:none}
.aff-step{min-width:0;padding:20px;border:1px solid var(--aff-line);border-radius:14px;background:var(--aff-inner)}
.aff-step-n{display:grid;place-items:center;width:32px;height:32px;margin:0 0 16px;border-radius:10px;background:rgba(54,184,237,.12);box-shadow:inset 0 0 0 1px rgba(54,184,237,.4);color:var(--aff-soft);font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
#affiliateSection .aff-step h3{margin:0 0 4px;font-size:14.5px;letter-spacing:-.01em}
.aff-step p{margin:0;color:var(--aff-muted);font-size:13px;line-height:1.55}

/* Ketentuan (Lampiran A, verbatim) */
.aff-join{scroll-margin-top:90px}.aff-join:focus{outline:none}
#affiliateSection .aff-title{margin:0 0 12px;font-size:22px;line-height:1.25;letter-spacing:-.03em}
.aff-lead{max-width:68ch;margin:0;color:var(--aff-body);font-size:14px;line-height:1.7}
.aff-join-block{margin-top:24px;padding-top:20px;border-top:1px solid var(--aff-line)}
#affiliateSection .aff-join-block h3{margin:0 0 8px;font-size:15px;letter-spacing:-.01em}
.aff-join-block p,.aff-join-block li{max-width:68ch;margin:0 0 8px;color:#bdc2c8;font-size:14px;line-height:1.7}
.aff-join-block ul{display:grid;gap:4px;margin:0;padding-left:20px}.aff-join-block li::marker{color:var(--aff-b1)}.aff-join-block strong{color:#fff}
#affiliateSection .aff-join-block .aff-rate-title{color:var(--aff-soft);font-size:16px}
.aff-rate{width:100%;max-width:440px;margin:8px 0 16px;border:1px solid var(--aff-line);border-collapse:separate;border-spacing:0;border-radius:14px;background:var(--aff-inner);font-size:13.5px;font-variant-numeric:tabular-nums;overflow:hidden}
.aff-rate th,.aff-rate td{padding:12px 16px;border-bottom:1px solid var(--aff-line);text-align:left}.aff-rate tbody tr:last-child td{border-bottom:0}
.aff-rate th{color:var(--aff-muted);font-size:12px;font-weight:600}.aff-rate th:last-child,.aff-rate td:last-child{text-align:right}.aff-rate td:last-child{color:var(--aff-soft);font-weight:700}
.aff-accept{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-top:24px;padding:16px;border:1px solid rgba(54,184,237,.3);border-radius:14px;background:linear-gradient(135deg,rgba(54,184,237,.08),rgba(108,123,255,.04))}
.aff-check{display:flex;align-items:flex-start;gap:12px;flex:1 1 260px;color:#e6e6e6;font-size:14px;line-height:1.5;cursor:pointer}
.aff-check input{flex:none;width:18px;height:18px;margin:1px 0 0;accent-color:var(--aff-b1);cursor:pointer}
#affJoinStatus:empty{display:none}

/* ---------- Dashboard ---------- */
.aff-banner{display:flex;align-items:flex-start;gap:12px;margin:0;padding:12px 16px;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(255,255,255,.04);color:#ddd;font-size:13.5px;line-height:1.6}
.aff-banner svg{flex:none;width:18px;height:18px;margin-top:2px;color:var(--aff-muted)}
.aff-dash{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:16px;align-items:stretch}

/* Link card */
.aff-linkfield{display:flex;align-items:center;gap:8px;min-height:54px;padding:6px 6px 6px 16px;border:1px solid var(--aff-line);border-radius:14px;background:rgba(0,0,0,.5)}
#affLink{flex:1;min-width:0;color:#fff;font:650 15px/1.4 Geist,Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:-.005em;overflow-wrap:anywhere}
#affLink .aff-code{color:var(--aff-b1);letter-spacing:.02em}
#affiliateSection #affCopyLink{flex:none;min-width:76px}
#affLinkStatus{margin:8px 0 0}#affLinkStatus:empty{display:none}
.aff-share{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
#affiliateSection .aff-share .btn{min-width:0;padding:0 12px;white-space:nowrap}
.aff-long{display:none}
.aff-tip{margin:12px 0 0;color:var(--aff-muted);font-size:12.5px;line-height:1.6}
.aff-miles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.aff-mile{display:flex;align-items:center;gap:12px;min-width:0;min-height:48px;padding:8px 12px;border:1px solid var(--aff-line);border-radius:12px;background:var(--aff-inner);color:#8d939b;font-size:13px;font-weight:600}
.aff-mile-dot{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.05);color:#7d838b}
.aff-mile-dot svg{width:15px;height:15px}
.aff-mile.done{color:#fff;border-color:rgba(54,184,237,.45);background:linear-gradient(135deg,rgba(54,184,237,.12),rgba(108,123,255,.05))}
.aff-mile.done .aff-mile-dot{background:linear-gradient(135deg,var(--aff-b1),var(--aff-ind));color:#fff;box-shadow:0 0 16px -4px rgba(54,184,237,.8)}

/* Balance card: "Bisa ditarik" amount, Tertahan / Sudah ditarik rows, the action and one helper line.
   The card is its own container: the amount's size follows the card width and its length (--len characters,
   about .56em each), so Rp 90.000 shows big and Rp 1.234.567.890 still fits one line; it wraps rather than overflow. */
.aff-withdraw{container-type:inline-size;display:flex;flex-direction:column;gap:16px;min-width:0}
#affiliateSection .card.aff-withdraw{background:radial-gradient(120% 70% at 100% 0%,rgba(54,184,237,.1),transparent 60%),radial-gradient(90% 60% at 0% 100%,rgba(108,123,255,.06),transparent 70%),var(--glass),var(--glass-base)}
#affiliateSection .card.aff-withdraw:before{background:var(--rim)}
/* When the card is taller than its content (beside the link card), the label and amount take the extra height and
   sit centred in it; rows, action and helper stay together at the bottom. On phones there is no extra height. */
.aff-balance-main{display:grid;flex:1 0 auto;align-content:center;gap:8px;min-width:0}
.aff-balance-label{color:var(--aff-muted);font-size:12px;font-weight:650;letter-spacing:.12em;line-height:1.4;text-transform:uppercase}
#affAvailable{--len:9;display:block;max-width:100%;font-size:clamp(20px,calc(100cqi / (var(--len) * .56)),44px);font-weight:720;line-height:1.1;letter-spacing:-.035em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;background:var(--aff-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.aff-balance-rows{display:grid;gap:8px}
.aff-balance-row{display:grid;gap:4px;min-width:0;min-height:48px;align-content:center;padding:8px 16px;border:1px solid var(--aff-line);border-radius:12px;background:var(--aff-inner)}
.aff-balance-line{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.aff-balance-row small{display:flex;align-items:center;gap:4px;flex:none;color:var(--aff-muted);font-size:13px}
.aff-balance-row strong{min-width:0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
.aff-release{display:flex;align-items:center;gap:8px;min-width:0;color:var(--aff-muted);font-size:12px;line-height:1.5}
.aff-release svg{flex:none;width:14px;height:14px;color:var(--aff-b1)}.aff-release strong{color:var(--aff-soft);font-weight:650}
.aff-withdraw-help{margin:-8px 0 0;color:var(--aff-muted);font-size:12.5px;line-height:1.5;text-align:center}
#affWithdrawStatus{margin:-8px 0 0;text-align:center}#affWithdrawStatus:empty{display:none}
.aff-info{display:inline-grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:#8a8f96;cursor:pointer}
.aff-info:hover,.aff-info[aria-expanded="true"]{color:var(--aff-soft)}.aff-info svg{width:15px;height:15px}
.aff-info:focus-visible{outline:2px solid var(--aff-b1);outline-offset:1px}
.aff-held-info{margin:0;padding:12px 16px;border:1px solid rgba(54,184,237,.25);border-radius:12px;background:rgba(54,184,237,.06);color:#cfe9f7;font-size:12.5px;line-height:1.6;text-align:left}.aff-held-info[hidden]{display:none}

/* Stat tiles */
.aff-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}
.aff-tile{container-type:inline-size;position:relative;isolation:isolate;display:flex;flex-direction:column;gap:8px;min-width:0;padding:20px;border-radius:18px;background:var(--glass),var(--glass-base);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 20px 50px -32px rgba(0,0,0,.95)}
.aff-tile:before{content:"";position:absolute;inset:0;z-index:-1;padding:1px;border-radius:inherit;background:var(--rim-calm);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.aff-tile:first-child:before{background:var(--rim)}
.aff-tile dt{color:var(--aff-muted);font-size:12.5px;font-weight:550}
.aff-tile dd{display:flex;flex:1;flex-direction:column;gap:8px;margin:0}
/* Like the balance: sized to the tile and the value's length, so a long total stays on one line. */
.aff-tile-value{--len:6;font-size:clamp(15px,calc(100cqi / (var(--len) * .6)),24px);font-weight:720;line-height:1.15;letter-spacing:-.035em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.aff-tile-note{margin-top:auto;color:#7f868f;font-size:12px;line-height:1.45}
.aff-bars{display:flex;align-items:flex-end;gap:4px;height:36px;margin-top:4px}
.aff-bars i{flex:1;min-height:3px;border-radius:4px 4px 2px 2px;background:linear-gradient(180deg,var(--aff-b1),rgba(20,121,184,.28))}
.aff-bars i.zero{background:rgba(255,255,255,.08)}

/* Commission feed */
.aff-feed{display:grid;margin:0;padding:0;list-style:none}
.aff-item{display:grid;grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"av who amount" "av meta status";column-gap:16px;row-gap:4px;align-items:center;padding:12px 0;border-bottom:1px solid var(--aff-line)}
.aff-item:first-child{padding-top:0}.aff-item:last-child{padding-bottom:0;border-bottom:0}
.aff-avatar{grid-area:av;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,rgba(54,184,237,.26),rgba(108,123,255,.18));box-shadow:inset 0 0 0 1px rgba(54,184,237,.3);color:var(--aff-soft);font-size:13px;font-weight:700;letter-spacing:.02em}
.aff-item-who{grid-area:who;min-width:0;color:#fff;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.aff-item-meta{grid-area:meta;min-width:0;color:var(--aff-muted);font-size:12.5px}
.aff-item-amount{grid-area:amount;justify-self:end;color:var(--aff-b1);font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.aff-item-status{grid-area:status;justify-self:end}
.aff-item[data-state="void"] .aff-item-amount{color:#7d838b;text-decoration:line-through}
@media(prefers-reduced-motion:no-preference){.aff-item{animation:affRise .45s cubic-bezier(.2,.8,.2,1) both}.aff-item:nth-child(2){animation-delay:.05s}.aff-item:nth-child(3){animation-delay:.1s}.aff-item:nth-child(4){animation-delay:.15s}.aff-item:nth-child(n+5){animation-delay:.2s}}
@keyframes affRise{from{opacity:0;transform:translateY(6px)}}

/* Chips (statuses) */
.aff-chip{display:inline-block;padding:2px 10px;border:1px solid #343434;border-radius:999px;background:#141414;color:#cfcfcf;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap}
.aff-chip.available,.aff-chip.pending{color:var(--aff-soft);border-color:rgba(54,184,237,.45);background:rgba(54,184,237,.12)}
.aff-chip.held{color:#e6e6e6;border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.05)}
.aff-chip.sent{color:#f5f5f5;border-color:rgba(255,255,255,.22)}
.aff-chip.withdrawn{color:var(--aff-soft);border-color:rgba(54,184,237,.45);background:rgba(54,184,237,.12)}
.aff-chip.void,.aff-chip.rejected{color:#9a9a9a}

/* Withdrawal history table */
#affiliateSection .table-wrap{max-height:none}
#affiliateSection .aff-table{min-width:0}#affiliateSection .aff-table th{background:transparent}#affiliateSection .aff-table td{vertical-align:top}.aff-status{display:grid;justify-items:start;gap:4px}
.aff-row-note{max-width:40ch;color:var(--aff-muted);font-size:12px;line-height:1.5;white-space:normal}
.aff-more{display:flex;justify-content:center;margin-top:16px}.aff-more:has(> [hidden]){display:none}
#affCommissionsMoreStatus,#affWithdrawalsMoreStatus{margin:8px 0 0;text-align:center}#affCommissionsMoreStatus:empty,#affWithdrawalsMoreStatus:empty{display:none}

/* Empty, loading and error states */
.aff-empty{display:grid;justify-items:center;gap:12px;padding:24px 16px;border:1px dashed rgba(255,255,255,.12);border-radius:14px;text-align:center}
.aff-empty svg{width:28px;height:28px;padding:8px;box-sizing:content-box;border-radius:12px;background:rgba(54,184,237,.1);color:var(--aff-b1)}
.aff-empty p{max-width:52ch;margin:0;color:var(--aff-muted);font-size:13.5px;line-height:1.6}
.aff-loading{display:grid;gap:12px}.aff-loading .notice{margin:0}
.aff-loading-bar{display:block;height:6px;border-radius:99px;background:linear-gradient(90deg,rgba(255,255,255,.05),rgba(54,184,237,.35),rgba(255,255,255,.05));background-size:200% 100%;animation:affShimmer 1.4s linear infinite}
@keyframes affShimmer{to{background-position:-200% 0}}
.aff-error{display:grid;justify-items:start;gap:12px}.aff-error .notice{margin:0}

/* Dialogs */
.aff-dialog{width:min(440px,calc(100% - 32px));padding:24px;border:0;border-radius:18px;background:var(--glass),rgba(10,14,19,.96);color:#eee;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 28px 100px rgba(0,0,0,.55),0 0 60px -30px rgba(54,184,237,.6);isolation:isolate}
.aff-dialog:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:var(--rim);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;z-index:-1}
.aff-dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(3px)}
.aff-dialog h2{margin:0 0 16px;font-size:18px;letter-spacing:-.02em}
/* Withdraw amount: one field with a "Rp" prefix, Tarik semua, the available balance and the live error. */
.aff-dialog-amount{display:grid;gap:8px;margin-bottom:16px;padding:16px;border:1px solid rgba(54,184,237,.3);border-radius:14px;background:linear-gradient(135deg,rgba(54,184,237,.1),rgba(108,123,255,.05))}
.aff-amount-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.aff-amount-head label{color:#e6e6e6;font-size:13px;font-weight:600}
.aff-amount-all{min-height:32px;padding:0 12px;border:1px solid rgba(54,184,237,.45);border-radius:999px;background:rgba(54,184,237,.12);color:var(--aff-soft);font:650 12.5px/1 Geist,Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s}
.aff-amount-all:hover{background:rgba(54,184,237,.2);border-color:var(--aff-b1)}.aff-amount-all:focus-visible{outline:2px solid var(--aff-b1);outline-offset:2px}
.aff-amount-input{display:flex;align-items:center;gap:8px;min-width:0;min-height:52px;padding:0 16px;border:1px solid var(--aff-line);border-radius:12px;background:rgba(0,0,0,.45);transition:border-color .2s,box-shadow .2s}
.aff-amount-input:focus-within{border-color:rgba(54,184,237,.7);box-shadow:0 0 0 3px rgba(54,184,237,.18)}
.aff-amount-input:has([aria-invalid="true"]){border-color:rgba(255,255,255,.28)}
.aff-amount-input span{flex:none;color:var(--aff-muted);font-size:18px;font-weight:650}
#affAmount{flex:1;min-width:0;width:100%;height:50px;padding:0;border:0;background:transparent;color:#fff;font:720 24px/1 Geist,Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums;outline:none;box-shadow:none}
#affAmount::placeholder{color:#5d636b}
.aff-amount-hint{margin:0;color:var(--aff-muted);font-size:12px;line-height:1.5}.aff-amount-hint strong{color:#fff;font-weight:650;font-variant-numeric:tabular-nums}
.aff-amount-error{margin:0;color:var(--danger);font-size:12.5px;line-height:1.5}.aff-amount-error:empty{display:none}
#affWithdrawForm .field{margin:12px 0}
.aff-dialog-hint{margin:12px 0 0}
.aff-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.aff-dialog .aff-dialog-actions .btn{min-height:44px;padding:0 12px}
#affWithdrawFormStatus:empty,#affQrStatus:empty{display:none}
#affQrDialog{width:min(380px,calc(100% - 32px))}
#affQrDialog h2{margin-bottom:4px}#affQrDialog .aff-dialog-hint{margin:0 0 16px}
.aff-qr-box{display:grid;place-items:center;padding:16px;border-radius:14px;background:#fff}
#affQrCanvas{display:block;width:100%;max-width:232px;height:auto;aspect-ratio:1;image-rendering:pixelated}
.aff-qr-link{margin:12px 0 0;color:#fff;font-size:14px;font-weight:650;text-align:center;overflow-wrap:anywhere}

/* ---------- Layout by the section's own width ---------- */
@container aff (min-width:900px){.aff-share .aff-long{display:inline}}
@container aff (max-width:899px){
  .aff-hero-grid{grid-template-columns:1fr;gap:24px}
  .aff-dash{grid-template-columns:1fr}
  .aff-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .aff-share .aff-long{display:inline}
}
@container aff (max-width:620px){
  #affiliateSection .card.aff-panel,#affiliateSection .aff-hero{padding:20px 16px}
  .aff-rim-inner,.aff-calc{padding:20px 16px}
  #affiliateSection .aff-display{font-size:30px}
  #affiliateSection .aff-title{font-size:20px}
  .aff-sub{margin:12px 0 20px;font-size:14.5px}
  #affJumpTerms,.aff-accept .btn{width:100%}
  .aff-calc-big{font-size:36px}
  .aff-steps{grid-template-columns:1fr;gap:8px;margin-top:24px}
  .aff-step{display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:16px;padding:16px}
  .aff-step-n{grid-row:span 2;margin:0}
  .aff-share .aff-long{display:none}
  .aff-mile{gap:8px;padding:8px 10px;font-size:12.5px}.aff-mile-dot{width:24px;height:24px}.aff-mile-dot svg{width:14px;height:14px}
  .aff-tiles{gap:8px}
  .aff-tile{padding:16px;border-radius:14px}
  .aff-tile-value{font-size:clamp(14px,calc(100cqi / (var(--len) * .6)),20px)}
  .aff-item{grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"av who amount" "av meta meta" "av status status";column-gap:12px}
  .aff-item-status{justify-self:start;margin-top:4px}
  .aff-join-block p,.aff-join-block li,.aff-lead{font-size:13.5px}
  .aff-rate th,.aff-rate td{padding:12px}
  /* Withdrawal history as cards. */
  #affiliateSection .aff-table thead{display:none}#affiliateSection .aff-table,#affiliateSection .aff-table tbody,#affiliateSection .aff-table tr,#affiliateSection .aff-table td{display:block;width:100%}
  #affiliateSection .aff-table tr{margin-bottom:8px;padding:12px;border:1px solid var(--aff-line);border-radius:12px;background:var(--aff-inner)}#affiliateSection .aff-table tr:last-child{margin-bottom:0}
  #affiliateSection .aff-table td{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:4px 0;border:0;white-space:normal;text-align:right}
  #affiliateSection .aff-table td:before{content:attr(data-label);flex:none;color:var(--aff-muted);text-align:left}
  #affiliateSection .aff-table tbody tr:hover td{background:transparent}.aff-status{justify-items:end}.aff-row-note{text-align:right}
}
.aff-dialog .btn{white-space:nowrap}
@media(max-width:440px){.aff-dialog{padding:20px 16px}#affAmount{font-size:22px}.aff-dialog-actions{grid-template-columns:1fr}.aff-dialog-actions .btn-primary{order:-1}}

@media(prefers-reduced-motion:reduce){
  .aff-rim,.aff-pulse,.aff-loading-bar,.aff-item{animation:none}
  .aff-chip-btn,.aff-amount-all,.aff-amount-input,.aff-range::-webkit-slider-thumb{transition:none}
}
