/* ============================================
   Infinity Flow Group — Páginas internas
   ============================================ */

/* ---- Page header ---- */

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  flex-wrap: wrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 150px;
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.12), 0 0 70px rgba(124, 77, 255, 0.08);
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(6, 11, 26, 0.94) 0%, rgba(6, 11, 26, 0.78) 42%, rgba(6, 11, 26, 0.55) 100%),
    var(--page-hero-img, none) right center / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.page-hero__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(0, 229, 255, 0.14) 48%, transparent 72%);
  background-size: 200% 100%;
  animation: shineSweep 7s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

.page-hero--academia {
  --page-hero-img: url("../img/banner-academia.jpg");
}

.page-hero--matrix {
  --page-hero-img: url("../img/banner-matrix.jpg");
}

.page-hero--wallet {
  --page-hero-img: url("../img/banner-wallet.jpg");
}

.page-hero--rangos {
  --page-hero-img: url("../img/trophy-leader.jpg");
}

.page-hero--productos {
  --page-hero-img: url("../img/hero-infinity.jpg");
}

.page-hero__copy,
.page-hero__actions {
  position: relative;
  z-index: 2;
}

.page-hero__copy {
  flex: 1;
  min-width: 220px;
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

.page-hero__copy h1 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.page-hero__copy p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 540px;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.3));
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.15);
}

.btn--primary:hover {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

.btn--ghost {
  background: rgba(14, 28, 58, 0.6);
  border-color: var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--gold {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.2), rgba(255, 152, 0, 0.15));
  border-color: rgba(255, 213, 79, 0.4);
  color: var(--gold);
}

.btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

/* ---- Filters ---- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 1rem 1.25rem;
}

.filters__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filters select,
.filters input[type="date"],
.filters input[type="search"],
.filters input[type="text"] {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: rgba(6, 11, 26, 0.65);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  min-width: 140px;
}

.filters select:focus,
.filters input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-filter {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(14, 28, 58, 0.7);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.chip-filter:hover,
.chip-filter.is-active {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.12);
}

/* ---- Stats strip ---- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-card__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card__value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-card__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Network tree / list ---- */

.network-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
}

.level-stats {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.level-row {
  display: grid;
  grid-template-columns: 70px 1fr 60px 50px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(6, 11, 26, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.level-row__bar {
  height: 8px;
  background: rgba(0, 229, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.level-row__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(6, 11, 26, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.member:hover {
  border-color: var(--border-strong);
  background: rgba(0, 229, 255, 0.06);
}

.member__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.4);
}

.member__info {
  flex: 1;
  min-width: 0;
}

.member__info strong {
  display: block;
  font-size: 0.9rem;
}

.member__info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.member__meta {
  text-align: right;
  font-size: 0.78rem;
}

.member__meta strong {
  display: block;
  color: var(--gold);
}

.member__meta span {
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.3rem;
}

.status-dot--on {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
}

.status-dot--off {
  background: var(--text-muted);
}

/* ---- Matrix detail ---- */

.matrix-detail {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1.25rem;
}

.matrix-board {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Legacy pos-slot (otras vistas / fallback) */
.pos-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pos-grid--l1 {
  grid-template-columns: repeat(3, 1fr);
}

.pos-grid--l2 {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.pos-slot {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(0, 229, 255, 0.25);
  background: rgba(6, 11, 26, 0.4);
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.pos-slot.is-filled {
  border-style: solid;
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.06);
}

.pos-slot img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin: 0 auto;
}

.pos-slot strong {
  font-size: 0.82rem;
}

.pos-slot span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.pos-slot--empty i {
  font-size: 1.2rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ---- Matrix tree (3×2 pirámide) ---- */

.mtx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.mtx-head__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.mtx-head__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  font-size: 1rem;
}

.mtx-head__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.mtx-head__sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mtx-head__chips {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mtx-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.4rem 0.4rem;
  border-radius: 999px;
  background: rgba(6, 11, 26, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.16);
  backdrop-filter: blur(10px);
}

.mtx-chip--sm {
  padding: 0.28rem 0.55rem 0.28rem 0.28rem;
  gap: 0.35rem;
}

.mtx-chip__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  flex-shrink: 0;
}

.mtx-chip--sm .mtx-chip__dot {
  width: 26px;
  height: 26px;
  font-size: 0.55rem;
}

.mtx-chip__dot--n1 {
  background: linear-gradient(135deg, #00bcd4, #00e5ff);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.mtx-chip__dot--n2 {
  background: linear-gradient(135deg, #7c4dff, #b388ff);
  box-shadow: 0 0 10px rgba(124, 77, 255, 0.4);
}

.mtx-chip__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mtx-chip__meta strong {
  font-size: 0.88rem;
  font-weight: 700;
}

.mtx-chip--sm .mtx-chip__meta strong {
  font-size: 0.75rem;
}

.mtx-chip__meta small {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mtx-scroll {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.mtx-scroll--compact {
  flex: 1;
  min-width: 0;
  align-self: stretch;
}

.mtx-stage {
  position: relative;
  flex-shrink: 0;
  width: max-content;
  min-width: 520px;
  max-width: none;
  margin: 0 auto;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 70% 55% at 50% 18%, rgba(124, 77, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 70%, rgba(0, 229, 255, 0.08), transparent 65%),
    rgba(6, 11, 26, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.1);
  transform: scale(var(--mtx-scale, 1));
  transform-origin: top center;
  will-change: transform;
}

.mtx-stage--compact {
  min-width: 280px;
  padding: 0.85rem 0.5rem 0.65rem;
  gap: 0.2rem;
}

.mtx-stage__glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 229, 255, 0.22), rgba(124, 77, 255, 0.12), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  animation: mtxGlowPulse 4.5s ease-in-out infinite;
  z-index: 0;
}

.mtx-stage > *:not(.mtx-stage__glow) {
  position: relative;
  z-index: 1;
}

.mtx-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  text-align: center;
}

.mtx-node__orb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

.mtx-node--root .mtx-node__orb {
  width: 84px;
  height: 84px;
  background: linear-gradient(145deg, #00e5ff 0%, #7c4dff 55%, #5c6bc0 100%);
  box-shadow:
    0 0 0 3px rgba(6, 11, 26, 0.85),
    0 0 28px rgba(0, 229, 255, 0.45),
    0 0 48px rgba(124, 77, 255, 0.28);
  animation: mtxRootPulse 3.2s ease-in-out infinite;
}

.mtx-node--root .mtx-node__orb .fa-crown {
  font-size: 0.85rem;
  color: var(--gold);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  margin-bottom: -2px;
}

.mtx-node__you {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mtx-node__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9800, #ffb74d);
  color: #1a1208;
  font-size: 0.62rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.45);
  line-height: 1.2;
}

.mtx-node__caption {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mtx-node__caption--root {
  color: var(--cyan);
  font-weight: 650;
  letter-spacing: 0.04em;
}

.mtx-node__name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mtx-node--filled .mtx-node__orb {
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
  background: rgba(6, 11, 26, 0.6);
}

.mtx-node--filled .mtx-node__orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.mtx-node--empty .mtx-node__orb {
  border: 2px dashed rgba(139, 155, 184, 0.45);
  background: rgba(14, 28, 58, 0.35);
  color: var(--text-muted);
  animation: emptyPulse 2.8s ease-in-out infinite;
}

.mtx-node--empty .mtx-node__orb .fa-user-plus {
  font-size: 0.95rem;
  opacity: 0.75;
}

.mtx-node__empty-txt {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.mtx-node--sm .mtx-node__orb {
  width: 48px;
  height: 48px;
}

.mtx-node--sm .mtx-node__name {
  font-size: 0.62rem;
  max-width: 56px;
}

.mtx-node--sm .mtx-node__caption {
  font-size: 0.58rem;
}

.mtx-node--sm.mtx-node--empty .mtx-node__orb .fa-user-plus {
  font-size: 0.75rem;
}

.mtx-node--sm .mtx-node__empty-txt {
  font-size: 0.5rem;
}

.mtx-node--compact .mtx-node__orb {
  width: 48px;
  height: 48px;
}

.mtx-node--compact.mtx-node--root .mtx-node__orb {
  width: 56px;
  height: 56px;
}

.mtx-node--compact.mtx-node--root .mtx-node__orb .fa-crown {
  font-size: 0.65rem;
}

.mtx-node--compact .mtx-node__you {
  font-size: 0.78rem;
}

.mtx-node--compact .mtx-node__badge {
  font-size: 0.52rem;
  padding: 0.1rem 0.35rem;
  top: -3px;
  right: -6px;
}

.mtx-node--compact .mtx-node__name {
  font-size: 0.62rem;
  max-width: 52px;
}

.mtx-node--compact .mtx-node__empty-txt {
  font-size: 0.48rem;
}

.mtx-node:hover .mtx-node__orb {
  transform: scale(1.07);
}

.mtx-node--filled:hover .mtx-node__orb {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  border-color: var(--cyan);
}

.mtx-node--empty:hover .mtx-node__orb {
  border-color: rgba(0, 229, 255, 0.65);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
}

.mtx-stem {
  width: 2px;
  height: 22px;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.55), rgba(124, 77, 255, 0.35));
  border-radius: 2px;
}

.mtx-stem--sm {
  height: 14px;
}

.mtx-level {
  display: flex;
  justify-content: center;
  width: 100%;
}

.mtx-level--l1 {
  gap: clamp(1.5rem, 6vw, 3.5rem);
  padding-top: 0.35rem;
  position: relative;
}

.mtx-level--l1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(66% + 1rem);
  max-width: 320px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.35), transparent);
  opacity: 0.7;
}

.mtx-level--l2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 540px;
  margin-top: 0.55rem;
  padding: 0 0.25rem;
}

.mtx-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.mtx-group__stem {
  width: 2px;
  height: 14px;
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.45), rgba(0, 229, 255, 0.2));
  border-radius: 2px;
}

.mtx-group__nodes {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  position: relative;
  padding-top: 0.25rem;
}

.mtx-group__nodes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124, 77, 255, 0.35), transparent);
}

.mtx-stage--compact .mtx-level--l1 {
  gap: 0.85rem;
}

.mtx-stage--compact .mtx-level--l1::before {
  max-width: 180px;
}

.mtx-stage--compact .mtx-level--l2 {
  max-width: 300px;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.mtx-stage--compact .mtx-group__nodes {
  gap: 0.28rem;
}

.mtx-stage--compact .mtx-node--sm .mtx-node__orb {
  width: 30px;
  height: 30px;
}

.mtx-stage--compact .mtx-node--sm .mtx-node__name,
.mtx-stage--compact .mtx-node--sm .mtx-node__caption,
.mtx-stage--compact .mtx-node--sm .mtx-node__empty-txt {
  display: none;
}

.mtx-stage--compact .mtx-group__stem {
  height: 8px;
}

.mtx-progress {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.12);
}

.mtx-progress--compact {
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
}

.mtx-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mtx-progress__meta strong {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.mtx-progress__pct {
  color: var(--cyan);
  font-weight: 650;
}

.mtx-progress__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.1);
  overflow: hidden;
}

.mtx-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--gold));
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
  animation: mtxBarShine 3.5s ease-in-out infinite;
}

@keyframes mtxGlowPulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

@keyframes mtxRootPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(6, 11, 26, 0.85),
      0 0 24px rgba(0, 229, 255, 0.4),
      0 0 40px rgba(124, 77, 255, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(6, 11, 26, 0.85),
      0 0 34px rgba(0, 229, 255, 0.6),
      0 0 56px rgba(124, 77, 255, 0.38);
  }
}

@keyframes mtxBarShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (max-width: 700px) {
  .mtx-head__title {
    font-size: 1rem;
  }

  .mtx-stage {
    min-width: 360px;
    padding: 1.15rem 0.55rem 0.85rem;
  }

  .mtx-node--root .mtx-node__orb {
    width: 68px;
    height: 68px;
  }

  .mtx-node__orb {
    width: 54px;
    height: 54px;
  }

  .mtx-node--sm .mtx-node__orb {
    width: 40px;
    height: 40px;
  }

  .mtx-node__name {
    max-width: 58px;
    font-size: 0.66rem;
  }

  .mtx-node--sm .mtx-node__name {
    max-width: 46px;
  }

  .mtx-level--l1 {
    gap: 0.85rem;
  }

  .mtx-level--l2 {
    gap: 0.35rem;
    max-width: 340px;
  }

  .mtx-group__nodes {
    gap: 0.25rem;
  }

  .mtx-stage--compact {
    min-width: 240px;
  }
}

.cycle-history {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cycle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(6, 11, 26, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.cycle-item__id {
  font-weight: 700;
  color: var(--cyan);
  font-size: 0.85rem;
}

.cycle-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cycle-item__pay {
  font-weight: 700;
  color: var(--gold);
}

/* ---- Commission tables / activity ---- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.activity:last-child {
  border-bottom: none;
}

.activity__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.activity__icon--cyan {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
}

.activity__icon--gold {
  background: rgba(255, 213, 79, 0.15);
  color: var(--gold);
}

.activity__icon--purple {
  background: rgba(124, 77, 255, 0.15);
  color: var(--purple);
}

.activity__icon--green {
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
}

.activity__body {
  flex: 1;
  min-width: 0;
}

.activity__body strong {
  display: block;
  font-size: 0.88rem;
}

.activity__body span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.activity__amount {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.activity__amount.is-pos {
  color: var(--green);
}

.activity__amount.is-neg {
  color: #ff5252;
}

/* ---- Projection ---- */

.proj-big {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.proj-tile {
  padding: 1.25rem;
  text-align: center;
  background: rgba(6, 11, 26, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.proj-tile span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.proj-tile strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan);
}

.proj-tile small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ---- Ranks ---- */

.rank-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.rank-card {
  padding: 1.15rem;
  text-align: center;
  background: rgba(6, 11, 26, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rank-card.is-current {
  border-color: rgba(255, 213, 79, 0.5);
  box-shadow: 0 0 28px rgba(255, 213, 79, 0.15);
}

.rank-card.is-locked {
  opacity: 0.55;
}

.rank-card__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.2), rgba(124, 77, 255, 0.2));
  color: var(--cyan);
}

.rank-card.is-current .rank-card__icon {
  background: linear-gradient(145deg, rgba(255, 213, 79, 0.3), rgba(255, 152, 0, 0.2));
  color: var(--gold);
}

.rank-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.rank-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rank-card__pv {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
}

.rank-card__badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 213, 79, 0.2);
  color: var(--gold);
  border: 1px solid rgba(255, 213, 79, 0.35);
}

.benefit-list {
  display: grid;
  gap: 0.55rem;
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: rgba(6, 11, 26, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.benefit i {
  color: var(--green);
  margin-top: 0.15rem;
}

/* ---- Wallet ---- */

.wallet-balance {
  padding: 1.75rem 1.5rem;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(124, 77, 255, 0.1)),
    rgba(14, 28, 58, 0.5);
}

.wallet-balance__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.wallet-balance__amount {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff, var(--cyan), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wallet-balance__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.pay-methods {
  display: grid;
  gap: 0.65rem;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(6, 11, 26, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pay-method__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
}

.pay-method__info {
  flex: 1;
}

.pay-method__info strong {
  display: block;
  font-size: 0.9rem;
}

.pay-method__info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Academia / Products cards ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.media-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.22), 0 12px 28px rgba(0, 0, 0, 0.3);
}

.media-card__thumb {
  height: 150px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(124, 77, 255, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.media-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.media-card:hover .media-card__thumb img {
  transform: scale(1.06);
}

.media-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 11, 26, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.media-card__play {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.22);
  border: 1px solid rgba(0, 229, 255, 0.55);
  color: #fff;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.35);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.media-card:hover .media-card__play {
  transform: scale(1.08);
  background: rgba(0, 229, 255, 0.4);
}

.media-card__thumb > i {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.45));
}

.media-card__thumb--gold {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.25), rgba(255, 152, 0, 0.3));
}

.media-card__thumb--purple {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(0, 188, 212, 0.25));
}

.media-card__thumb--mint {
  background: linear-gradient(135deg, rgba(29, 233, 182, 0.25), rgba(0, 229, 255, 0.3));
}

.media-card__thumb--img {
  background: #0a1228;
}

.course-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.3) transparent;
}

.course-rail > .media-card {
  scroll-snap-align: start;
}

.events-list,
.goals-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.event-row,
.goal-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.45);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.event-row:hover,
.goal-row:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.event-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  flex-shrink: 0;
}

.event-row__body {
  flex: 1;
  min-width: 0;
}

.event-row__body strong {
  display: block;
  font-size: 0.88rem;
}

.event-row__body span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.goal-row i {
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.55));
}

.goal-row.is-pending i {
  color: var(--text-muted);
  filter: none;
}

.academia-extras {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 1.1rem;
}

@media (max-width: 1024px) {
  .academia-extras {
    grid-template-columns: 1fr;
  }

  .course-rail {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    overflow: visible;
  }
}

.media-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.media-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.media-card__body h3 {
  font-size: 1rem;
  font-weight: 700;
}

.media-card__body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
}

.progress-mini {
  margin-top: 0.25rem;
}

.progress-mini__bar {
  height: 6px;
  background: rgba(0, 229, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-mini__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

.progress-mini__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.price-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
}

.price-tag small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---- Promo materials ---- */

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.promo-card {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.promo-card__preview {
  height: 100px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, #0a1628, #1a1040 50%, #0a2840);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.75rem;
}

.copy-box {
  background: rgba(6, 11, 26, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  position: relative;
}

.copy-box__actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.link-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.link-row input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: rgba(6, 11, 26, 0.65);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-size: 0.82rem;
  outline: none;
}

/* ---- Reports charts ---- */

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  height: 180px;
  padding: 0.5rem 0.25rem 0;
}

.chart-bars__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: flex-end;
}

.chart-bars__fill {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  height: var(--h, 50%);
  min-height: 8px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  transition: height 0.8s var(--ease);
}

.chart-bars__col span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
  font-size: 0.88rem;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-row strong {
  color: var(--cyan);
}

/* ---- FAQ / Help ---- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.4);
  overflow: hidden;
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}

.faq-item__q i {
  color: var(--cyan);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.faq-item.is-open .faq-item__q i {
  transform: rotate(180deg);
}

.faq-item__a {
  display: none;
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.faq-item.is-open .faq-item__a {
  display: block;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.guide-card {
  padding: 1.15rem;
  text-align: center;
  background: rgba(6, 11, 26, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.guide-card:hover {
  border-color: var(--border-strong);
  background: rgba(0, 229, 255, 0.06);
}

.guide-card i {
  font-size: 1.5rem;
  color: var(--cyan);
  margin-bottom: 0.65rem;
}

.guide-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.guide-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: rgba(6, 11, 26, 0.65);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--border-strong);
}

/* ---- Panel padding helper ---- */

.panel__body {
  padding: 0 1.25rem 1.25rem;
  position: relative;
  z-index: 1;
}

.panel__head + .panel__body {
  padding-top: 0;
}

.panel > .filters,
.panel > .stat-strip,
.panel > .table-wrap {
  position: relative;
  z-index: 1;
}

.empty-note {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.text-purple {
  color: var(--purple);
}

.text-mint {
  color: var(--mint);
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .network-layout,
  .matrix-detail,
  .two-col {
    grid-template-columns: 1fr;
  }

  .three-col {
    grid-template-columns: 1fr;
  }

  .proj-big {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page-hero {
    padding: 1.15rem 1.1rem;
    min-height: 0;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .level-row {
    grid-template-columns: 60px 1fr 50px;
  }

  .level-row span:last-child {
    display: none;
  }

  .pos-grid--l1,
  .pos-grid--l2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filters select,
  .filters input {
    width: 100%;
    min-width: 0;
  }
}
