/* ===== Investimentos — visual novo dos contratos (.cx) e das formas de pagamento (.pm2) =====
   Prévia: só entra em uso quando INV_V2 (localhost ou localStorage vx_inv_v2=1). */

.cx-list{gap:1.1rem}
@media (min-width:760px){.cx-list{grid-template-columns:1fr 1fr}}

.cx{--acc:#3ddc84;position:relative;overflow:hidden;border-radius:18px;border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,0) 55%),var(--surface-2);
  transition:border-color .25s ease,transform .25s ease}
.cx:hover{border-color:var(--line-gold,rgba(202,162,74,.32))}
/* guilloché: linhas finas de título/certificado no topo */
.cx::before{content:'';position:absolute;inset:0 0 auto 0;height:150px;pointer-events:none;opacity:.55;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60' viewBox='0 0 160 60'%3E%3Cg fill='none' stroke='%23caa24a' stroke-opacity='.13' stroke-width='.6'%3E%3Cpath d='M0 30 C20 10 40 10 60 30 S100 50 120 30 S150 10 160 30'/%3E%3Cpath d='M0 22 C20 2 40 2 60 22 S100 42 120 22 S150 2 160 22'/%3E%3Cpath d='M0 38 C20 18 40 18 60 38 S100 58 120 38 S150 18 160 38'/%3E%3Cpath d='M0 14 C20 -6 40 -6 60 14 S100 34 120 14 S150 -6 160 14'/%3E%3Cpath d='M0 46 C20 26 40 26 60 46 S100 66 120 46 S150 26 160 46'/%3E%3C/g%3E%3C/svg%3E") 0 0/160px 60px repeat-x;
  -webkit-mask:linear-gradient(180deg,#000 10%,transparent);mask:linear-gradient(180deg,#000 10%,transparent)}
.cx>*{position:relative}
.cx.st-matured{--acc:#f0b54a;border-color:rgba(240,181,74,.4)}
.cx.st-pending{--acc:#caa24a}
.cx.st-canceled{--acc:#ff6b6b;opacity:.78}
.cx.st-completed{--acc:#6aa0ff}

.cx-head{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:1rem 1.15rem 0}
.cx-id{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;font-size:.66rem;letter-spacing:.16em;color:var(--muted)}
.cx-pill{display:inline-flex;align-items:center;gap:.4rem;padding:.22rem .6rem;border-radius:999px;font-size:.62rem;font-weight:600;
  letter-spacing:.1em;text-transform:uppercase;color:var(--acc);border:1px solid color-mix(in srgb,var(--acc) 40%,transparent);
  background:color-mix(in srgb,var(--acc) 9%,transparent)}
.cx-pill i{width:6px;height:6px;border-radius:50%;background:var(--acc);box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 22%,transparent)}
.cx.st-active .cx-pill i{animation:cxPulse 2.4s ease-in-out infinite}
@keyframes cxPulse{50%{box-shadow:0 0 0 5px color-mix(in srgb,var(--acc) 0%,transparent)}}

.cx-body{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;padding:.95rem 1.15rem .2rem}
.cx-lbl{display:block;font-size:.6rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:.3rem}
.cx-cap b,.cx-pl b{display:block;font-family:var(--f-disp);font-weight:700;font-size:clamp(1.25rem,2.2vw,1.5rem);letter-spacing:-.02em;
  line-height:1.05;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.cx-plan{display:block;margin-top:.4rem;font-size:.72rem;color:var(--ink-2)}
.cx-pl{text-align:right}
.cx-pl b{font-size:clamp(1.05rem,1.8vw,1.22rem)}
.cx-pl b.up{color:var(--up)}.cx-pl b.down{color:var(--down)}
.cx-roi{display:inline-block;margin-top:.4rem;font-size:.7rem;font-weight:600;font-variant-numeric:tabular-nums;padding:.08rem .4rem;border-radius:6px}
.cx-roi.up{color:var(--up);background:rgba(61,220,132,.1)}.cx-roi.down{color:var(--down);background:rgba(255,95,95,.1)}

.cx-spark{display:block;width:100%;height:46px;margin-top:.35rem;color:var(--up)}
.cx-spark.down{color:var(--down)}
.cx-sp-l{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.cx-sp-0{stroke:var(--line);stroke-width:1;stroke-dasharray:3 4}

/* picote de canhoto */
.cx-perf{height:0;margin:0 1.15rem;border-top:1.5px dashed var(--line)}
.cx-perf::before,.cx-perf::after{content:'';position:absolute;top:-10px;width:20px;height:20px;border-radius:50%;
  background:var(--bg,#08080a);border:1px solid var(--line)}
.cx-perf::before{left:calc(-1.15rem - 11px)}.cx-perf::after{right:calc(-1.15rem - 11px)}

.cx-foot{padding:.95rem 1.15rem 1rem}
.cx-tl{position:relative;height:4px;border-radius:999px;background:var(--surface-3,rgba(255,255,255,.06))}
.cx-tl i{position:absolute;inset:0 auto 0 0;border-radius:999px;background:linear-gradient(90deg,var(--gold-2,#caa24a),var(--gold-1,#f6d77a))}
.cx-tl em{position:absolute;top:50%;width:10px;height:10px;border-radius:50%;transform:translate(-50%,-50%);
  background:var(--gold-1,#f6d77a);box-shadow:0 0 0 3px rgba(246,215,122,.18),0 0 10px rgba(246,215,122,.6)}
.cx-dates{display:flex;justify-content:space-between;gap:.6rem;margin-top:.5rem;font-size:.66rem;color:var(--muted);font-variant-numeric:tabular-nums}
.cx-left{color:var(--ink-2);font-weight:600}
.cx-note{margin-top:.6rem;font-size:.72rem;color:var(--ink-2);line-height:1.45}
.cx-note.warn{color:#f0b54a}
.cx-row{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-top:.85rem;flex-wrap:wrap}
.cx-method{display:inline-flex;align-items:center;gap:.5rem;font-size:.74rem;color:var(--ink-2)}
.cx-method .pm-logo{width:24px;height:24px;border-radius:7px}
.cx-method .pm-logo svg{width:14px;height:14px}
.cx-method .pm-cardx{border-radius:50%}.cx-method .pm-cardx svg{width:22px;height:22px}
.cx-acts{display:inline-flex;align-items:center;gap:.5rem;margin-left:auto}
.cx-btn{height:32px;padding:0 .95rem;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--ink);
  font:600 .76rem var(--f-body);cursor:pointer;transition:filter .2s,border-color .2s}
.cx-btn.cx-gold{border:0;color:#1a1405;background:linear-gradient(120deg,var(--gold-1),var(--gold-2))}
.cx-btn:hover{filter:brightness(1.08);border-color:var(--gold-2)}
.cx-link{white-space:nowrap;background:none;border:0;padding:.3rem 0;font:500 .72rem var(--f-body);color:var(--muted);cursor:pointer;
  text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:color .2s,text-decoration-color .2s}
.cx-link:hover{color:var(--down);text-decoration-color:currentColor}
.cx .ic-pay{margin-left:0}
.cx .ic-cancel{width:auto;height:auto;border:0;border-radius:0;flex-shrink:0}
.cx .ic-cancel:hover{border:0}

/* ===== formas de pagamento ===== */
.ct-methods:has(.pm2){grid-template-columns:1fr!important;gap:.55rem}
.ct-methods .ct-method.pm2{flex-direction:row;align-items:center;text-align:left;gap:.9rem;padding:.8rem .95rem;border-radius:14px}
.pm-logo{flex:none;width:42px;height:42px;border-radius:12px;display:grid;place-items:center}
.pm-logo svg{width:22px;height:22px}
.pm-pix{background:rgba(50,188,173,.12);color:#32bcad;box-shadow:inset 0 0 0 1px rgba(50,188,173,.25)}
.pm-usdt{background:#26a17b;color:#fff;border-radius:50%;box-shadow:inset 0 -3px 6px rgba(0,0,0,.18)}
.pm-usdt svg{width:24px;height:24px}
.pm-card{background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);display:flex;flex-direction:column;justify-content:center;gap:1px}
.pm-visa{color:#1a1f71;line-height:0}.pm-visa svg{width:26px;height:16px}
.pm-mc{position:relative;width:18px;height:11px;display:block}
.pm-mc i{position:absolute;top:0;width:11px;height:11px;border-radius:50%}
.pm-mc i:first-child{left:0;background:#eb001b}.pm-mc i:last-child{right:0;background:#f79e1b;mix-blend-mode:multiply;opacity:.95}
.pm-wallet,.pm-voucher{background:rgba(202,162,74,.12);color:var(--gold-txt,#d6ad50)}
.pm-wallet svg,.pm-voucher svg{width:17px;height:17px}
.pm-cardx{border-radius:50%;color:#fff;background:linear-gradient(140deg,#4fc49a 0%,#1f8f6c 60%,#166d52 100%);box-shadow:inset 0 -3px 6px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.3)}
.pm-cardx svg{width:36px;height:36px}
/* bandeiras: sem fundo, uma cor só, mesma altura ótica */
.pm-brands{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin-top:.5rem;color:var(--muted)}
.cb{display:inline-flex;align-items:center;line-height:0;opacity:.85;transition:color .2s,opacity .2s}
.cb svg{height:14px;width:auto}
.cb-apple svg{height:18px}.cb-gpay svg{height:13px}.cb-visa svg{height:11px}.cb-mc svg{height:15px}.cb-amex svg{height:19px}.cb-diners svg{height:15px}
.ct-method.pm2:hover .cb,.ct-method.pm2.on .cb{color:var(--ink-2);opacity:1}
.pm-txt{display:flex;flex-direction:column;gap:.12rem;min-width:0}
.pm-name{font-family:var(--f-disp);font-weight:700;font-size:.92rem;color:var(--ink);letter-spacing:-.005em}
.pm-sub{font-size:.72rem;color:var(--muted);line-height:1.35}
.pm-check{margin-left:auto;flex:none;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;transition:.2s}
.ct-method.pm2.on .pm-check{border-color:var(--gold-2);background:var(--gold-2)}
.ct-method.pm2.on .pm-check::after{content:'';width:5px;height:9px;border:solid #1a1405;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.ct-method.pm2.on{background:rgba(202,162,74,.07)}

@media (max-width:520px){
  .pm-brands{gap:.6rem}
  .cx-body{padding-top:.85rem}
  .cx-cap b{font-size:1.3rem}
  .ct-methods .ct-method.pm2{padding:.7rem .8rem}
  .ct-methods .ct-method.pm2 .pm-sub{display:block}
}
@media (prefers-reduced-motion:reduce){.cx.st-active .cx-pill i{animation:none}}
