/* ═══════════════════════════════════════════════════════
   Affiliate MLM Pro — Public CSS v2.2 (Consolidated)
   No Tailwind — Specialized for Dark Themes & Transparency
   ═══════════════════════════════════════════════════════ */

:root {
  --p: #7c3aed;
  --p-light: #a78bfa;
  --p-dark: #5b21b6;
  --p-bg: rgba(124, 58, 237, .12);
  --bg: #0f0b1e;
  --sf: #17102e;
  --card: #1e1635;
  --card2: #261d45;
  --bd: rgba(124, 58, 237, .22);
  --bd2: rgba(255, 255, 255, .06);
  --tx: #f0ecff;
  --tx2: #c4b5fd;
  --mt: #7c6a9a;
  --grn: #10b981;
  --blu: #3b82f6;
  --amb: #f59e0b;
  --red: #ef4444;
  --rose: #f43f5e;
  --fn: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r: 8px;
  --r2: 12px;
  --r3: 18px;
  --r4: 24px;
}

/* ─── ANIMATION ─────────────────────────────────── */
@keyframes aFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── RESETS ────────────────────────────────────── */
.amlm-v2,
.amlm-v2 * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.amlm-v2 {
  font-family: var(--fn);
  color: var(--tx);
  background: var(--bg);
  border-radius: var(--r4);
  overflow: hidden;
  max-width: 1200px;
  margin: 2rem auto;
  animation: aFadeIn .4s ease-out;
}

.amlm-v2 a {
  color: var(--p-light);
  text-decoration: none;
  transition: .2s;
}

.amlm-v2 a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.amlm-v2 svg.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ─── HEADER BAR ────────────────────────────────── */
.amlm-hbar {
  background: linear-gradient(135deg, #1e0d3e, #0f0b1e);
  border-bottom: 1px solid var(--bd);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.amlm-hbar-l {
  display: flex;
  align-items: center;
  gap: 14px;
}

.amlm-hbar-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p), #4f46e5);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(124, 58, 237, .5);
  box-shadow: 0 0 16px rgba(124, 58, 237, .3);
}

.amlm-hbar-nm {
  font-size: .95rem;
  font-weight: 700;
}

.amlm-hbar-bal strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--grn);
}

.amlm-hbar-out {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .2);
  border-radius: var(--r);
  color: #f87171;
  font-size: .78rem;
  font-weight: 600;
}

/* ─── NAVIGATION ────────────────────────────────── */
.amlm-nav {
  display: flex;
  overflow-x: auto;
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
  scrollbar-width: none;
}

.amlm-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 18px;
  font-size: .63rem;
  font-weight: 700;
  color: var(--mt);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.amlm-nav a.on {
  color: var(--p-light);
  border-bottom-color: var(--p);
  background: rgba(124, 58, 237, .1);
}

/* ─── CONTENT AREA ──────────────────────────────── */
.amlm-body {
  padding: 1.5rem;
  min-height: 300px;
}

.amlm-card {
  background: var(--card);
  border: 1px solid var(--bd2);
  border-radius: var(--r3);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.amlm-card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--bd2);
}

/* ─── STAT GRID ─────────────────────────────────── */
.amlm-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}

@media(max-width:860px) {
  .amlm-stats {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media(max-width:480px) {
  .amlm-stats {
    grid-template-columns: repeat(2, 1fr)
  }
}

.amlm-st {
  background: var(--card);
  border: 1px solid var(--bd2);
  border-radius: var(--r2);
  padding: 1rem .7rem;
  text-align: center;
}

.amlm-st-v {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  display: block;
  margin-top: 5px;
}

.amlm-st-l {
  font-size: .62rem;
  color: var(--mt);
  font-weight: 600;
  text-transform: uppercase;
}

.amlm-st.c-blue {
  border-top: 3px solid var(--blu);
}

.amlm-st.c-purple {
  border-top: 3px solid #8b5cf6;
}

.amlm-st.c-amber {
  border-top: 3px solid var(--amb);
}

.amlm-st.c-green {
  border-top: 3px solid var(--grn);
}

/* ─── STATS + PENAJA (TRANSPARENT VERSION) ───────── */
.amlm-sp {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .amlm-sp { grid-template-columns: 1fr; gap: 2rem; } }

.amlm-sp-stats-grid { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}
.amlm-sp-stat-item { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 6px 0; 
  border: none !important;
  background: transparent !important;
}
.amlm-sp-stat-item span { 
  font-size: 1rem; 
  color: #fff !important; 
  font-weight: 500;
}
.amlm-sp-stat-item b { 
  font-size: 1.1rem; 
  font-weight: 800; 
  color: #fff !important; 
}

.amlm-sp-penaja h4 { 
  color: #f59e0b !important; /* Amber from screenshot */
  font-size: 1.2rem; 
  font-weight: 800;
  margin-bottom: 1.5rem; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  background: transparent !important; 
  padding: 0 !important; 
  border: none !important; 
}
.amlm-sp-penaja ul { list-style: none; padding: 0; margin: 0; }
.amlm-sp-penaja li { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  margin-bottom: 16px; 
  font-size: 1rem; 
  color: #fff !important; 
  background: transparent !important;
}
.amlm-sp-penaja li svg { 
  width: 22px !important; 
  height: 22px !important; 
  color: #f59e0b !important; /* Amber icons */
  stroke: #f59e0b !important;
  opacity: 1; 
}
.amlm-sp-penaja a { 
  color: #fff !important; 
  text-decoration: none; 
  font-weight: 500; 
  border: none !important;
}
.amlm-sp-penaja a:hover { opacity: 0.8; }

/* ─── TABLES ────────────────────────────────────── */
.amlm-tw {
  overflow-x: auto;
  margin-top: 1rem;
}

.amlm-tb {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.amlm-tb th {
  text-align: left;
  padding: .6rem .8rem;
  background: var(--sf);
  color: var(--mt);
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--bd2);
}

.amlm-tb td {
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  vertical-align: middle;
}

.amlm-pill {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.amlm-pill.active {
  background: rgba(16, 185, 129, .15);
  color: #34d399;
}

.amlm-pill.pending {
  background: rgba(245, 158, 11, .15);
  color: #fbbf24;
}

/* ─── FORMS & BUTTONS ───────────────────────────── */
.amlm-frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

@media(max-width:560px) {
  .amlm-frow {
    grid-template-columns: 1fr
  }
}

.amlm-fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: .75rem;
}

.amlm-lbl {
  font-size: .78rem;
  font-weight: 600;
  color: var(--tx2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.amlm-fg input,
.amlm-fg select,
.amlm-fg textarea {
  width: 100%;
  padding: .62rem .9rem;
  background: var(--sf);
  border: 1.5px solid rgba(255, 255, 255, .08);
  border-radius: var(--r);
  font-size: .88rem;
  color: var(--tx);
  font-family: var(--fn);
  outline: none;
  transition: .2s;
}

.amlm-fg input:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

.amlm-btn {
  width: 100%;
  padding: .8rem;
  background: linear-gradient(135deg, var(--p), #4f46e5);
  color: #fff;
  border: none;
  border-radius: var(--r2);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.amlm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, .3);
}

/* ─── SPECIAL COMPONENT: QR CODE ────────────────── */
.amlm-qr img {
  width: 110px !important;
  height: 110px !important;
  border-radius: var(--r);
  border: 4px solid #fff;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ─── OLD COMPAT (MINIMAL) ───────────────────────── */
.amlm-penaja-card {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
}

.amlm-wa-btn {
  display: block;
  text-align: center;
  padding: .6rem 1rem;
  background: #25d366;
  color: #fff;
  border-radius: var(--r);
  font-weight: 700;
  text-decoration: none;
}