/* Sync365 · v10: rujukan (affiliate). Kad tawaran pada skrin Daftar (RM100 -> RM75), medan kod rujukan, panel "Pautan rujukan" di Akaun dan tab Rujukan admin.
   Gerakan: transform, opacity dan warna; lengkung --ease-out; harga bertukar dengan gelongsor menegak (bukan lantunan). Kurangkan gerakan: html[data-reduce]. */

/* ---- kad tawaran (sebelah gelap skrin Daftar) ---- */
.of { position: relative; width: min(100%, 540px); margin-top: 30px; padding: 24px 26px 22px; border-radius: 26px; background: rgba(241, 242, 236, .04); box-shadow: inset 0 0 0 1px rgba(241, 242, 236, .1); }
.of-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.of-e { display: inline-flex; align-items: center; gap: 9px; font: 700 11px var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); }
.of-e::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.of-save { padding: 4px 11px; border-radius: 99px; font: 700 12.5px var(--f-ui); color: var(--ink3); box-shadow: inset 0 0 0 1px rgba(241, 242, 236, .18); transition: color .3s ease, background-color .3s ease, box-shadow .3s ease, transform .4s var(--ease-out); }
.of[data-ref="1"] .of-save { color: #04211b; background: var(--accent); box-shadow: none; transform: scale(1.04); }

.of-pr { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; color: var(--ink); font-family: var(--f-display); line-height: 1; }
.of-rm { align-self: flex-start; margin-top: 10px; font-size: 30px; opacity: .72; }
.of-roll { position: relative; display: block; height: 1em; width: 3.05ch; overflow: hidden; transition: width .5s var(--ease-out); font-size: 88px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.of-n { display: block; height: 1em; transition: transform .6s var(--ease-out), opacity .35s ease, color .35s ease; }
.of-n1 { position: absolute; left: 0; top: 0; transform: translateY(100%); opacity: 0; color: var(--accent); }
.of[data-ref="1"] .of-roll { width: 2.05ch; } .of[data-ref="1"] .of-n0 { transform: translateY(-100%); opacity: 0; } .of[data-ref="1"] .of-n1 { transform: none; opacity: 1; }
.of-old { font: 600 22px var(--f-ui); color: rgba(241, 242, 236, .5); text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0; transform: translateX(-8px); transition: opacity .3s ease .12s, transform .5s var(--ease-out) .12s; }
.of[data-ref="1"] .of-old { opacity: 1; transform: none; }
.of-per { font: 500 17px var(--f-ui); color: var(--ink3); }

.of-sub { display: grid; margin: 0 0 18px; min-height: 26px; }
.of-sub p { grid-area: 1 / 1; margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink2); transition: opacity .3s ease, transform .45s var(--ease-out); }
.of-s1 { opacity: 0; transform: translateY(8px); pointer-events: none; } .of-s1 b { color: var(--ink); }
.of[data-ref="1"] .of-s0 { opacity: 0; transform: translateY(-8px); pointer-events: none; } .of[data-ref="1"] .of-s1 { opacity: 1; transform: none; pointer-events: auto; }
.of-s0 .linkbtn { color: var(--accent-text); font-weight: 700; }

.of-pts { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid rgba(241, 242, 236, .1); display: grid; gap: 12px; }
.of-pts li { display: flex; align-items: center; gap: 14px; font: 600 17px/1.25 var(--f-ui); color: var(--ink); }
.of .of-i { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: rgba(44, 240, 201, .12); color: var(--accent); }
.of .of-i .ai-s { stroke-width: 1.7; } .of .of-hot { fill: currentColor; fill-opacity: .3; }
.auth.enter .of { animation: rise .8s var(--ease-out) .3s both; } .auth.enter .of-pts li { animation: rise .6s var(--ease-out) calc(.7s + var(--k) * 90ms) both; }

/* skrin lebar: sebelah gelap kekal di tengah skrin semasa borang yang panjang ditatal */
@media (min-width: 1081px) { .auth .auth-side { position: sticky; top: 0; height: 100vh; align-self: start; } }

@media (max-width: 1080px) {
  .of { width: 100%; margin-top: 20px; padding: 16px 16px 16px; border-radius: 22px; }
  .of-pr { margin: 10px 0 4px; } .of-rm { font-size: 22px; margin-top: 7px; } .of-roll { font-size: 62px; } .of-old { font-size: 18px; }
  .of-sub { margin-bottom: 14px; } .of-sub p { font-size: 14px; }
  .of-pts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 14px; }
  .of-pts li { flex-direction: column; text-align: center; gap: 8px; font-size: 13px; }
  .of .of-i { width: 34px; height: 34px; padding: 7px; }
}

/* ---- medan kod rujukan (lipatan): "Ada kod rujukan? Harga RM75" membuka medan ---- */
.af-fold { margin: 0 0 14px; }
.af-fold-t { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--ink2); font: 600 14.5px var(--f-ui); text-align: left; cursor: pointer; transition: color .16s ease, transform .14s var(--ease-out); }
.af-fold-t:hover { color: var(--ink); } .af-fold-t:active { transform: scale(.985); } .af-fold-t:focus-visible { outline: 0; box-shadow: var(--focus); border-radius: 10px; }
.af-fold-t svg.i { width: 18px; height: 18px; color: var(--accent-text); } .af-fold-t b { color: var(--accent-text); }
.af-fold.open .af-fold-t { display: none; }
.af-fold-b { display: grid; grid-template-rows: 0fr; visibility: hidden; opacity: 0; transition: grid-template-rows .34s var(--ease-out), opacity .24s ease, visibility 0s .34s; }
.af-fold.open .af-fold-b { grid-template-rows: 1fr; visibility: visible; opacity: 1; transition: grid-template-rows .34s var(--ease-out), opacity .24s ease, visibility 0s; }
.af-fold-in { min-height: 0; overflow: hidden; padding: 4px 4px 0; margin: -4px -4px 0; } .af-fold-in .af { margin-bottom: 0; }
.af-fold-in .af-in { text-transform: uppercase; letter-spacing: .04em; } .af-fold-in .af-in::placeholder { text-transform: none; letter-spacing: 0; }
.af-hint { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ease-out); } .af-hint.show { grid-template-rows: 1fr; }
.af-hint-in { min-height: 0; overflow: hidden; display: flex; align-items: center; gap: 7px; padding-top: 0; font-size: 13.5px; line-height: 1.4; color: var(--ink3); opacity: 0; transition: opacity .2s ease, padding-top .26s var(--ease-out); }
.af-hint.show .af-hint-in { padding-top: 8px; opacity: 1; } .af-hint.ok .af-hint-in { color: var(--accent-text); font-weight: 600; }
.af-hint .ai-mini { flex: none; } .af-hint:not(.ok) .ai-chk { opacity: 0; }

/* ---- panel "Pautan rujukan" di Akaun ---- */
.rj { display: grid; gap: 14px; }
.rj-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rj-steps li { display: grid; justify-items: center; gap: 6px; text-align: center; } .rj-steps b { font: 600 13px/1.25 var(--f-ui); color: var(--ink); text-wrap: balance; }
.rj-i { --ai-soft: var(--accent-tint); color: var(--ink); width: 52px; height: 52px; overflow: visible; }
.rj-note { fill: currentColor; fill-opacity: .14; } .rj-bc { fill: var(--accent); } .rj-bs { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; } .rj-rm { stroke-width: 2.2; }
.rj-l1, .rj-l2, .rj-plus { transform-box: fill-box; }
.rj-steps li:hover .rj-l1, .rj-steps li:focus-within .rj-l1 { animation: rj-j1 .9s var(--ease-out) both; } .rj-steps li:hover .rj-l2 { animation: rj-j2 .9s var(--ease-out) both; }
.rj-steps li:hover .rj-plus { animation: rj-pop .7s var(--ease-out) both; transform-origin: 50% 50%; }
@keyframes rj-j1 { 0% { transform: translateX(-6px); } 100% { transform: none; } } @keyframes rj-j2 { 0% { transform: translateX(6px); } 100% { transform: none; } } @keyframes rj-pop { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: none; } }
.rj-make .lbl { display: block; margin-bottom: 6px; }
.rj-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; } .rj-fld { position: relative; flex: 1 1 200px; min-width: 0; }
.rj-in { width: 100%; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding-right: 108px; }
.rj-pre { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 13px var(--f-ui); letter-spacing: .08em; color: var(--ink3); pointer-events: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rj-code { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 18px 10px; border-radius: 20px; background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent-line); font: 400 40px/1 var(--f-display); letter-spacing: .02em; color: var(--ink); }
.rj-code span { display: inline-block; animation: rise .5s var(--ease-out) calc(var(--k) * 35ms) both; }
.rj-lnk { width: 100%; font-size: 14.5px; color: var(--ink2); text-overflow: ellipsis; }
.rj-acts { gap: 10px; } .btn.rj-ok { color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rj-stats { display: flex; gap: 28px; padding-top: 4px; } .rj-stats b { display: block; font: 400 34px/1.05 var(--f-display); } .rj-stats span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

/* ---- admin: tab Rujukan, nota pada baris pengguna, harga pantas ---- */
.ad-by { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--accent-text); } .ad-by svg.i { width: 13px; height: 13px; flex: none; }
.ad-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.rj-list { display: grid; gap: 12px; } .rj-card { margin-top: 0; padding: 0; overflow: hidden; }
.rj-card > summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 56px; } .rj-card > summary::-webkit-details-marker { display: none; }
.rj-card > summary > svg.i { flex: none; color: var(--ink3); transition: transform .24s var(--ease-out); } .rj-card[open] > summary > svg.i { transform: rotate(90deg); }
.rj-kod { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--accent-tint); color: var(--accent-text); font: 700 12.5px var(--f-ui); letter-spacing: .06em; }
.rj-n { flex: none; min-width: 58px; text-align: center; } .rj-n b { display: block; font: 400 22px/1.05 var(--f-display); } .rj-n span { font-size: 11px; color: var(--ink3); }
.rj-ulist { display: grid; padding: 0 16px 14px; border-top: 1px solid var(--rule); } .rj-urow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--rule); } .rj-urow:last-child { border-bottom: 0; }
@media (max-width: 700px) { .rj-card > summary { flex-wrap: wrap; gap: 8px 12px; } .rj-card > summary .grow { flex-basis: 100%; } .rj-urow .grow { flex-basis: 100%; } }

/* ---- kurangkan gerakan ---- */
html[data-reduce] .of, html[data-reduce] .of *, html[data-reduce] .af-fold *, html[data-reduce] .af-hint *, html[data-reduce] .rj-code span, html[data-reduce] .rj-i, html[data-reduce] .rj-i * { animation: none !important; transition: none !important; }
