/* ===== Live transactions: compact ticker card (home page + member dashboard) ===== */
.lv {
  --lv-ok: #34d399;
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 440px; margin: 26px auto 0; padding: 12px 12px 8px; text-align: left;
  border-radius: 20px;
}
/* thin animated rim on top */
.lv::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--lv-ok), rgba(var(--primary-rgb), .9), transparent);
  background-size: 200% 100%; animation: lvRim 4s linear infinite; opacity: .8;
}
@keyframes lvRim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* soft aurora behind the glass */
.lv::before {
  content: ''; position: absolute; inset: -40%; z-index: -1; pointer-events: none; opacity: .4;
  background:
    radial-gradient(30% 30% at 15% 15%, rgba(var(--primary-rgb), .35), transparent 70%),
    radial-gradient(30% 30% at 90% 85%, rgba(52,211,153,.22), transparent 70%);
  animation: lvAurora 16s ease-in-out infinite alternate;
}
@keyframes lvAurora { to { transform: translate3d(6%, -4%, 0) rotate(8deg); } }

/* header */
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.lv-title { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 800; min-width: 0; }
.lv-badge { font-size: .58rem; font-weight: 800; letter-spacing: 1.2px; padding: 2px 6px; border-radius: 999px;
  color: #052e1f; background: linear-gradient(135deg, #6ee7b7, #10b981); box-shadow: 0 0 12px -2px rgba(16,185,129,.7); }

/* radar pulse; bursts again when a new event lands */
.lv-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--lv-ok); flex: none; box-shadow: 0 0 8px var(--lv-ok); }
.lv-pulse::before, .lv-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--lv-ok); animation: lvRing 2.2s ease-out infinite; }
.lv-pulse::after { animation-delay: 1.1s; }
.lv-pulse.burst { animation: lvBurst .6s var(--ease); }
@keyframes lvRing { from { transform: scale(1); opacity: .8; } to { transform: scale(3); opacity: 0; } }
@keyframes lvBurst { 40% { transform: scale(1.8); } }

.lv-sync { font-size: .68rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lv-sync i { display: inline-block; }
.lv-sync.spin i { animation: lvSpin .8s linear; }
@keyframes lvSpin { to { transform: rotate(360deg); } }

/* headline numbers: one slim row of chips */
.lv-stats { display: flex; gap: 6px; margin: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
.lv-stats::-webkit-scrollbar { display: none; }
.lv-stat { flex: 1 0 auto; display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 5px 9px; border-radius: 999px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.lv-stat b { font-size: .8rem; font-weight: 800; }
.lv-stat small { color: var(--muted); font-size: .66rem; }
.lv-stat b.bump, .lv-today b.bump { animation: lvBump .6s var(--ease); }
@keyframes lvBump { 40% { transform: scale(1.2); color: var(--lv-ok); } }

/* the list */
.lv-list { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.lv-row {
  --c: #a78bfa;
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 13px; overflow: hidden;
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.04);
  transition: background .3s, border-color .3s, transform .25s var(--ease);
}
.lv-row:hover { background: color-mix(in srgb, var(--c) 9%, transparent); border-color: color-mix(in srgb, var(--c) 25%, transparent); transform: translateX(2px); }
.lv-row[data-type="withdrawal"]       { --c: #34d399; }
.lv-row[data-type="deposit"]          { --c: #22d3ee; }
.lv-row[data-type="membership"]       { --c: #a78bfa; }
.lv-row[data-type="task_earning"]     { --c: #fbbf24; }
.lv-row[data-type="referral_earning"] { --c: #f472b6; }
.lv-row[data-type="bonus"]            { --c: #fb923c; }
.lv-av { flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.lv-body { flex: 1; min-width: 0; line-height: 1.25; }
.lv-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
.lv-line b { font-weight: 800; }
.lv-line span { color: var(--muted); }
.lv-meta { display: flex; align-items: center; gap: 5px; margin-top: 1px; font-size: .64rem; color: var(--faint, var(--muted)); white-space: nowrap; overflow: hidden; }
.lv-chip { padding: 0 6px; border-radius: 999px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.lv-amt { flex: none; font-weight: 800; font-size: .8rem; color: var(--c); white-space: nowrap; padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 11%, transparent); }

/* new event: row unfolds, slides in, a light sweep passes */
.lv-row.lv-new { animation: lvIn .65s var(--ease) both; background: color-mix(in srgb, var(--c) 12%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.lv-row.lv-new::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--c) 30%, transparent) 50%, transparent 70%);
  transform: translateX(-100%); animation: lvSweep 1s .2s ease-out forwards; }
.lv-row.lv-new .lv-av { animation: lvPop .55s .1s var(--ease) both; }
.lv-row.lv-new .lv-amt { animation: lvAmt .8s .25s var(--ease) both; }
.lv-row.lv-settle { background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.04); transition: background 1.6s ease, border-color 1.6s ease; }
@keyframes lvIn { from { opacity: 0; transform: translateY(-8px) scale(.96); max-height: 0; padding-top: 0; padding-bottom: 0; }
                  60% { opacity: 1; } to { max-height: 60px; } }
@keyframes lvSweep { to { transform: translateX(100%); } }
@keyframes lvPop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } 70% { transform: scale(1.15) rotate(4deg); } }
@keyframes lvAmt { from { opacity: 0; transform: translateX(8px); filter: blur(3px); } }

/* oldest row leaving */
.lv-row.lv-out { animation: lvOut .45s ease forwards; }
@keyframes lvOut { to { opacity: 0; transform: scale(.95); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -4px; } }

/* first paint: rows cascade in */
.lv-list.cascade .lv-row { animation: lvCascade .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + .15s); }
@keyframes lvCascade { from { opacity: 0; transform: translateY(8px); } }

.lv-empty { text-align: center; padding: 14px 8px; color: var(--muted); font-size: .8rem; }
.lv-empty i { display: block; font-size: 1.3rem; margin-bottom: 4px; opacity: .7; }
.lv-foot { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 7px; font-size: .64rem; color: var(--faint, var(--muted)); }

@media (prefers-reduced-motion: reduce) {
  .lv::before, .lv::after, .lv-pulse::before, .lv-pulse::after, .lv-row.lv-new, .lv-row.lv-new::after, .lv-row.lv-new .lv-av,
  .lv-row.lv-new .lv-amt, .lv-list.cascade .lv-row { animation: none !important; }
}

/* ===== Dashboard variant ===== */
.lv.lv-dash { max-width: none; margin: 16px 0 0; padding: 12px; border-radius: 20px; }
.lv-dash .lv-title b { display: block; font-size: .9rem; }
.lv-dash .lv-title small { display: block; font-size: .64rem; font-weight: 500; color: var(--muted); }
.lv-ico { position: relative; width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: .95rem; color: #fff;
  background: linear-gradient(145deg, #6ee7b7, #10b981 60%, #059669); box-shadow: 0 8px 18px -8px rgba(16,185,129,.75), inset 0 1px 0 rgba(255,255,255,.4); }
.lv-ico .lv-pulse { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border: 2px solid var(--bg, #0b0820); }
.lv-today { display: flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.25); }
.lv-today b { font-size: .85rem; font-weight: 800; color: var(--lv-ok); }
.lv-today small { font-size: .64rem; color: var(--muted); }

/* segmented filter with a sliding pill */
.lv-filter { position: relative; display: flex; gap: 2px; padding: 3px; margin-bottom: 8px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.lv-filter button { position: relative; z-index: 1; flex: 1; padding: 5px 4px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; transition: color .3s; }
.lv-filter button.active { color: var(--on-primary, #1a1300); }
.lv-ind { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: 25%; border-radius: 9px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .9), rgba(var(--primary-rgb), .55));
  box-shadow: 0 6px 14px -6px rgba(var(--primary-rgb), .8), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .45s cubic-bezier(.34,1.4,.64,1), width .45s cubic-bezier(.34,1.4,.64,1); }
.lv-dash .lv-foot { justify-content: flex-start; flex-wrap: wrap; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.06); }
.lv-dash .lv-sync { font-size: inherit; }

/* the viewer's own transactions stand out */
.lv-row.lv-mine { background: linear-gradient(90deg, rgba(var(--primary-rgb), .16), transparent 85%); border-color: rgba(var(--primary-rgb), .3); }
.lv-you { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 999px; font-weight: 700; color: var(--on-primary, #1a1300);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), .95), rgba(var(--primary-rgb), .6)); }
@media (prefers-reduced-motion: reduce) { .lv-ind { transition: none; } }
