@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;600;700&family=Montserrat:wght@300;400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:        #08080F;
  --clr-surface:   #0D0E1A;
  --clr-violet:    #4F2BFF;
  --clr-magenta:   #C023E8;
  --clr-gold:      #FFC738;
  --clr-gold-lt:   #FFE08A;
  --clr-cyan:      #00D4FF;
  --clr-green:     #00C853;
  --clr-red:       #FF4444;
  --clr-white:     #FFFFFF;
  --clr-muted:     rgba(255,255,255,0.50);
  --clr-panel:     rgba(10,14,40,0.85);
  --clr-border:    rgba(192,35,232,0.22);
  --sidebar-w:     220px;

  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Montserrat', sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--clr-bg);
  font-family: var(--font-body);
  color: var(--clr-white);
  min-height: 100vh;
}

/* ══════════════════════════════════════════════
   SIDEBAR (escritorio)
══════════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: rgba(8,8,18,0.96);
  border-right: 1px solid var(--clr-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(192,35,232,0.3) transparent;
}

.sidebar-logo {
  padding: 24px 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--clr-border);
}
.sidebar-logo img { width: 130px; height: auto; }

.vip-chip {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.70rem; letter-spacing: 0.16em;
  background: linear-gradient(110deg, #FFC738, #FFE08A);
  color: #1A1000; padding: 3px 12px; border-radius: 20px;
  box-shadow: 0 0 12px rgba(255,199,56,0.40);
}

.sidebar-nav {
  display: flex; flex-direction: column;
  padding: 12px 0; flex: 1;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.90rem; letter-spacing: 0.06em;
  color: var(--clr-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-item:hover { color: var(--clr-white); background: rgba(192,35,232,0.07); }
.nav-item.active {
  color: var(--clr-magenta);
  border-left-color: var(--clr-magenta);
  background: rgba(192,35,232,0.10);
}
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }

.nav-sep {
  height: 1px; background: var(--clr-border);
  margin: 8px 20px;
}

.nav-back {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px 14px;
  font-family: var(--font-body); font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back:hover { color: rgba(255,255,255,0.65); }
.nav-back svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   TOPBAR (móvil)
══════════════════════════════════════════════ */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: rgba(8,8,18,0.97);
  border-bottom: 1px solid var(--clr-border);
  align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 200;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.topbar-logo img { height: 30px; width: auto; }
.topbar-vip {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.14em;
  background: linear-gradient(110deg,#FFC738,#FFE08A);
  color: #1A1000; padding: 2px 8px; border-radius: 20px;
}

.hamburger {
  background: none; border: none; cursor: pointer; padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--clr-white); border-radius: 2px; transition: 0.2s;
}

/* Drawer */
.drawer-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 300; opacity: 0; transition: opacity 0.2s;
}
.drawer-overlay.open { display: block; opacity: 1; }

.drawer {
  position: fixed; top: 0; left: -100%; width: 240px; height: 100vh;
  background: rgba(8,8,18,0.99);
  border-right: 1px solid var(--clr-border);
  z-index: 400; transition: left 0.25s cubic-bezier(0.22,1,0.36,1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.open { left: 0; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--clr-border);
}
.drawer-head img { height: 28px; }
.btn-close-drawer {
  background: none; border: none; color: var(--clr-muted); cursor: pointer;
  padding: 4px; font-size: 1.2rem; line-height: 1;
}

/* ══════════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════════ */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 32px 28px 48px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-family: var(--font-display); font-size: clamp(1.25rem, 4vw, 1.70rem);
  font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  background: linear-gradient(110deg, #C023E8, #7B5FFF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  word-break: break-word;
}
.page-header p { font-size: 0.80rem; color: var(--clr-muted); margin-top: 4px; }

/* ══════════════════════════════════════════════
   PANELES / CARDS
══════════════════════════════════════════════ */
.panel {
  background: var(--clr-panel);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  padding: 22px 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 28px rgba(192,35,232,0.08), 0 4px 18px rgba(0,0,0,0.40);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.panel-title {
  font-family: var(--font-display); font-size: 1.00rem; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--clr-magenta);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.panel-title svg { width: 15px; height: 15px; stroke: currentColor; flex-shrink: 0; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.col-stack { display: flex; flex-direction: column; gap: 18px; }

.section { margin-bottom: 24px; }

/* ══════════════════════════════════════════════
   INFO ROWS
══════════════════════════════════════════════ */
.info-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 0.76rem; color: var(--clr-muted);
  white-space: nowrap; flex-shrink: 0;
}
.info-value {
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem;
  text-align: right;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1;
}

/* Stat card */
.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: 8px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.stat-label { font-size: 0.72rem; color: var(--clr-muted); }
.stat-value {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.05rem, 3vw, 1.30rem);
  color: var(--clr-white);
  word-break: break-word;
}
.stat-value.gold    { color: var(--clr-gold); }
.stat-value.magenta { color: var(--clr-magenta); }
.stat-value.green   { color: var(--clr-green); }
.stat-value.cyan    { color: var(--clr-cyan); }
.stat-value.muted   { color: var(--clr-muted); }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.70rem; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.badge-green   { background: rgba(0,200,83,0.15);   color: #00C853; border: 1px solid rgba(0,200,83,0.30); }
.badge-red     { background: rgba(255,68,68,0.15);   color: #FF4444; border: 1px solid rgba(255,68,68,0.30); }
.badge-gold    { background: rgba(255,199,56,0.12);  color: #FFC738; border: 1px solid rgba(255,199,56,0.28); }
.badge-cyan    { background: rgba(0,212,255,0.12);   color: #00D4FF; border: 1px solid rgba(0,212,255,0.28); }
.badge-muted   { background: rgba(255,255,255,0.07); color: var(--clr-muted); border: 1px solid rgba(255,255,255,0.12); }
.badge-magenta { background: rgba(192,35,232,0.15);  color: #C023E8; border: 1px solid rgba(192,35,232,0.30); }

/* ══════════════════════════════════════════════
   ESCUDOS VIP
══════════════════════════════════════════════ */
.shields-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.shield-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

.shield-svg {
  width: 48px; height: 54px; position: relative;
}
.shield-svg svg { width: 100%; height: 100%; }

.shield-svg .shield-body { fill: rgba(255,255,255,0.06); stroke: rgba(255,255,255,0.18); stroke-width: 1.5; }
.shield-svg .shield-icon { stroke: rgba(255,255,255,0.25); fill: none; }

.shield-item.active .shield-body  { fill: rgba(192,35,232,0.20); stroke: #C023E8; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(192,35,232,0.45)); }
.shield-item.active .shield-icon  { stroke: #C023E8; }
.shield-item.complete .shield-body { fill: rgba(0,200,83,0.18); stroke: #00C853; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(0,200,83,0.45)); }
.shield-item.complete .shield-icon { stroke: #00C853; }

.shield-label {
  font-family: var(--font-display); font-size: 0.70rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--clr-muted); text-align: center;
}
.shield-item.active .shield-label  { color: var(--clr-magenta); }
.shield-item.complete .shield-label { color: var(--clr-green); }

.shield-price {
  font-size: 0.62rem; color: rgba(255,255,255,0.35); text-align: center;
}
.shield-item.active .shield-price,
.shield-item.complete .shield-price { color: rgba(255,255,255,0.60); }

/* ══════════════════════════════════════════════
   TABLA GLOBAL
══════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }

table {
  width: 100%; border-collapse: collapse;
  font-size: 0.80rem;
  min-width: 480px; /* evita que la tabla colapse a nada en móvil */
}
thead th {
  text-align: left; padding: 8px 10px;
  font-family: var(--font-display); font-size: 0.70rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--clr-muted); border-bottom: 1px solid var(--clr-border);
  white-space: nowrap;
}
tbody td {
  padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.80);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(192,35,232,0.04); }

.td-pool    { font-family: var(--font-display); font-weight: 700; color: var(--clr-magenta); }
.td-addr    { font-size: 0.74rem; font-family: monospace; color: rgba(255,255,255,0.60); }
.td-usdt    { font-family: var(--font-display); font-weight: 600; color: var(--clr-gold); }
.td-run     { color: var(--clr-cyan); font-family: var(--font-display); font-weight: 600; }

/* ══════════════════════════════════════════════
   BOTONES
══════════════════════════════════════════════ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.90rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 20px; border-radius: 6px;
  border: none; cursor: pointer; outline: none;
  text-decoration: none; transition: transform 0.16s, box-shadow 0.16s;
  overflow: hidden; white-space: nowrap;
}
.btn::after { content:''; position:absolute; inset:0; opacity:0; transition:opacity 0.16s; background:rgba(255,255,255,0.10); }
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-vip {
  background: linear-gradient(110deg, #4F2BFF, #C023E8);
  color: var(--clr-white);
  box-shadow: 0 0 16px rgba(192,35,232,0.35), 0 4px 12px rgba(79,43,255,0.25);
}
.btn-vip:hover { box-shadow: 0 0 26px rgba(192,35,232,0.55), 0 6px 18px rgba(79,43,255,0.38); }

.btn-gold {
  background: linear-gradient(110deg, #E8A800, #FFC738);
  color: #1A1000;
  box-shadow: 0 0 14px rgba(255,199,56,0.35);
}
.btn-gold:hover { box-shadow: 0 0 24px rgba(255,199,56,0.55); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
}
.btn-outline:hover { border-color: var(--clr-magenta); color: var(--clr-white); }

.btn-sm   { padding: 8px 12px; font-size: 0.78rem; }
.btn-full { width: 100%; }

/* Spinner */
.btn .spinner {
  display: none; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.30); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.btn.loading .btn-text { opacity: 0.5; }
.btn.loading .spinner  { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   POOL CARDS (comprapools)
══════════════════════════════════════════════ */
.pool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.pool-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: 10px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.18s, box-shadow 0.18s;
  min-width: 0;
}
.pool-card:hover      { border-color: rgba(192,35,232,0.50); box-shadow: 0 0 20px rgba(192,35,232,0.12); }
.pool-card.active-pool   { border-color: #C023E8; box-shadow: 0 0 18px rgba(192,35,232,0.20); }
.pool-card.complete-pool { border-color: #00C853; box-shadow: 0 0 16px rgba(0,200,83,0.15); }

.pool-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.pool-card-num {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--clr-magenta);
}
.pool-card-price {
  font-family: var(--font-display); font-weight: 700; font-size: 1.00rem;
  color: var(--clr-gold);
}

.pool-card-info { font-size: 0.75rem; color: var(--clr-muted); line-height: 1.6; }

.pool-card-row { display: flex; justify-content: space-between; font-size: 0.76rem; gap: 8px; flex-wrap: wrap; }
.pool-card-row .lbl { color: var(--clr-muted); }
.pool-card-row .val { font-family: var(--font-display); font-weight: 600; color: var(--clr-white); word-break: break-all; }

/* ══════════════════════════════════════════════
   REFERIDOS
══════════════════════════════════════════════ */
.ref-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: 8px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color 0.15s;
  min-width: 0;
}
.ref-card:hover { border-color: rgba(192,35,232,0.40); }

.ref-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #4F2BFF, #C023E8);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  color: #fff; flex-shrink: 0;
}

.ref-info { flex: 1; min-width: 0; }
.ref-addr {
  font-size: 0.76rem; font-family: monospace;
  color: rgba(255,255,255,0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-sub  { font-size: 0.68rem; color: var(--clr-muted); margin-top: 2px; }

.ref-earned {
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  color: var(--clr-gold); white-space: nowrap;
}

/* ══════════════════════════════════════════════
   HISTORIAL
══════════════════════════════════════════════ */
.tx-type {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.70rem; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.tx-reg      { background: rgba(79,43,255,0.15);   color: #7B5FFF; }
.tx-pool     { background: rgba(192,35,232,0.15);  color: #C023E8; }
.tx-ref      { background: rgba(0,200,83,0.15);    color: #00C853; }
.tx-pay      { background: rgba(0,212,255,0.15);   color: #00D4FF; }
.tx-withdraw { background: rgba(255,199,56,0.15);  color: #FFC738; }
.tx-run      { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.65); }

/* ══════════════════════════════════════════════
   PAGINACIÓN
══════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; flex-wrap: wrap;
}
.page-btn {
  padding: 6px 14px; border-radius: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--clr-border); color: var(--clr-muted);
  font-family: var(--font-display); font-size: 0.80rem; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.page-btn:hover, .page-btn.active { background: rgba(192,35,232,0.18); border-color: #C023E8; color: #fff; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 0.75rem; color: var(--clr-muted); padding: 0 6px; white-space: nowrap; }

/* ══════════════════════════════════════════════
   FILTROS / BÚSQUEDA
══════════════════════════════════════════════ */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; align-items: center;
}

.filter-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--clr-border); border-radius: 6px;
  padding: 8px 14px; color: var(--clr-white);
  font-family: var(--font-body); font-size: 0.82rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0; flex: 1;
}
.filter-input::placeholder { color: var(--clr-muted); }
.filter-input:focus { border-color: #C023E8; box-shadow: 0 0 0 3px rgba(192,35,232,0.12); }

.filter-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--clr-border); border-radius: 6px;
  padding: 8px 12px; color: var(--clr-white);
  font-family: var(--font-body); font-size: 0.82rem; outline: none;
  cursor: pointer; min-width: 120px;
}
.filter-select option { background: #0D0E1A; }

/* ══════════════════════════════════════════════
   SKELETON / LOADER
══════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.loader-row {
  display: flex; align-items: center; justify-content: center;
  padding: 32px; gap: 10px; color: var(--clr-muted); font-size: 0.80rem;
}
.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(192,35,232,0.30); border-top-color: #C023E8;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ══════════════════════════════════════════════
   ESTADO VACÍO
══════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; gap: 10px; text-align: center;
  color: var(--clr-muted);
}
.empty-state svg { width: 40px; height: 40px; stroke: rgba(255,255,255,0.20); margin-bottom: 6px; }
.empty-state p { font-size: 0.82rem; }

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 11px 18px; border-radius: 7px;
  font-size: 0.82rem; max-width: 320px; word-break: break-word;
  animation: toast-in 0.25s cubic-bezier(0.22,1,0.36,1) both;
  box-shadow: 0 4px 16px rgba(0,0,0,0.50);
}
.toast-success { background: rgba(0,200,83,0.18);  border: 1px solid rgba(0,200,83,0.40);  color: #00C853; }
.toast-error   { background: rgba(255,68,68,0.18);  border: 1px solid rgba(255,68,68,0.40);  color: #FF6666; }
.toast-info    { background: rgba(192,35,232,0.18); border: 1px solid rgba(192,35,232,0.40); color: #D06EFF; }
@keyframes toast-in { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ══════════════════════════════════════════════
   WALLET BAR
══════════════════════════════════════════════ */
.wallet-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--clr-border);
  border-radius: 6px; padding: 8px 14px; margin-bottom: 20px;
  font-size: 0.76rem; flex-wrap: wrap;
}
.wallet-bar .lbl  { color: var(--clr-muted); white-space: nowrap; }
.wallet-bar .addr { font-family: monospace; color: var(--clr-white); word-break: break-all; }
.wallet-bar .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clr-green); box-shadow: 0 0 6px var(--clr-green);
  flex-shrink: 0;
}
.wallet-bar .status-dot.disconnected { background: var(--clr-red); box-shadow: 0 0 6px var(--clr-red); }

/* ══════════════════════════════════════════════
   UTILIDADES
══════════════════════════════════════════════ */
.monospace   { font-family: monospace; font-size: 0.80rem; }
.text-muted  { color: var(--clr-muted); }
.text-gold   { color: var(--clr-gold); }
.text-green  { color: var(--clr-green); }
.text-red    { color: var(--clr-red); }
.text-magenta{ color: var(--clr-magenta); }
.text-cyan   { color: var(--clr-cyan); }
.text-sm     { font-size: 0.74rem; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet grande (≤ 1024px)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .shields-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .shield-svg { width: 44px; height: 50px; }
  .shield-label { font-size: 0.65rem; }
  .shield-price { font-size: 0.58rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 860px)
══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .main-wrap { padding: 28px 18px 40px; }
  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr 1fr; }
  .shields-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .shield-svg { width: 50px; height: 56px; }
  .shield-label { font-size: 0.70rem; }
  .shield-price { font-size: 0.60rem; }
  .pool-cards { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Móvil (≤ 700px)  — sidebar oculto
══════════════════════════════════════════════ */
@media (max-width: 700px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .topbar  { display: flex; }
  .main-wrap {
    margin-left: 0;
    padding: 72px 14px 40px;
  }

  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }

  .shields-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .shield-svg { width: 46px; height: 52px; }

  .pool-cards { grid-template-columns: 1fr; }

  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-input  { width: 100%; }
  .filter-select { width: 100%; }

  .btn-full-mob { width: 100%; }

  /* Tabla: scroll horizontal en móvil */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 480px; font-size: 0.76rem; }
  thead th { padding: 7px 8px; font-size: 0.66rem; }
  tbody td  { padding: 8px 8px; }

  /* Wallet bar en stack */
  .wallet-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wallet-bar .addr { font-size: 0.72rem; }

  /* Info rows en móvil */
  .info-row { flex-direction: column; gap: 2px; }
  .info-value { text-align: left; font-size: 0.84rem; }

  /* Ref card en móvil */
  .ref-card { flex-wrap: wrap; }
  .ref-earned { font-size: 0.80rem; }

  /* Pagination */
  .pagination { gap: 6px; }
  .page-btn { padding: 5px 10px; font-size: 0.74rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Móvil pequeño (≤ 420px)
══════════════════════════════════════════════ */
@media (max-width: 420px) {
  .main-wrap { padding: 68px 12px 36px; }

  .page-header h1 { font-size: 1.20rem; letter-spacing: 0.06em; }
  .page-header p  { font-size: 0.75rem; }

  .panel { padding: 16px 14px; }
  .panel-title { font-size: 0.90rem; }

  .shields-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .shield-svg { width: 42px; height: 48px; }
  .shield-label { font-size: 0.62rem; }
  .shield-price { display: none; } /* muy poco espacio en pantallas pequeñas */

  .stat-value { font-size: 1.05rem; }
  .stat-label { font-size: 0.68rem; }

  .badge { font-size: 0.66rem; padding: 2px 7px; }

  .btn { font-size: 0.82rem; padding: 10px 16px; letter-spacing: 0.06em; }
  .btn-sm { font-size: 0.72rem; padding: 7px 10px; }

  table { min-width: 420px; font-size: 0.72rem; }
  thead th { padding: 6px 6px; font-size: 0.62rem; }
  tbody td  { padding: 7px 6px; }

  #toast-container { bottom: 16px; right: 12px; max-width: calc(100vw - 24px); }
  .toast { font-size: 0.78rem; padding: 9px 14px; }

  .pool-card { padding: 14px; gap: 10px; }
  .pool-card-num { font-size: 1.10rem; }
  .pool-card-price { font-size: 0.92rem; }

  .ref-avatar { width: 32px; height: 32px; font-size: 0.76rem; }
  .ref-addr   { font-size: 0.72rem; }
}

/* ══════════════════════════════════════════════
   Reducir movimiento
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .btn, .pool-card, .ref-card, .nav-item { transition: none; }
  .skeleton, .spinner-sm, .btn .spinner  { animation: none; }
}

/* ══════════════════════════════════════════════
   STATS FOOTER BAR (lista global — al pie)
══════════════════════════════════════════════ */
.stats-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 10px 20px;
}

.stats-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
}

.stats-footer-label {
  font-size: 0.70rem;
  color: var(--clr-muted);
  white-space: nowrap;
}

.stats-footer-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}
.stats-footer-value.magenta { color: var(--clr-magenta); }
.stats-footer-value.cyan    { color: var(--clr-cyan); }
.stats-footer-value.gold    { color: var(--clr-gold); }

.stats-footer-sep {
  width: 1px;
  height: 28px;
  background: var(--clr-border);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .stats-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 2px;
  }
  .stats-footer-item { padding: 5px 0; }
  .stats-footer-sep  { display: none; }
  .stats-footer-label { font-size: 0.66rem; }
  .stats-footer-value { font-size: 0.84rem; }
}

/* ── v1.8: Lista Global — fila propia + badge ID ─────────── */
.row-highlight-me {
  background: rgba(0, 200, 100, 0.10);
  border-left: 3px solid #00c864;
}
.badge-me {
  display: inline-block;
  background: #00c864;
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 5px;
  vertical-align: middle;
}
.user-id-badge {
  font-weight: 700;
  color: var(--accent-cyan, #00d4ff);
}

/* ════════════════════════════════════════════════════════════════
   SELECTOR DE IDIOMA FLOTANTE (Google Translate)
   Orden visual: sobre contenido, header y drawers (≤ 400),
   debajo de toasts (9999) y modales (10000).
════════════════════════════════════════════════════════════════ */

/* — Ocultar barra, tooltips y resaltado nativos de Google — */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-spinner-pos,
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt,
#google_translate_element,
body > .skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-yAWNEb-L7lbkb {
  display: none !important;
  visibility: hidden !important;
}
body { top: 0 !important; }
.goog-text-highlight,
.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q {
  background: none !important;
  box-shadow: none !important;
}

/* — Contenedor flotante — */
.dr-lang {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 9000;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* — Botón "Idioma" — */
.dr-lang .dr-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin: 0;
  padding: 0 28px 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #5A4FD6 0%, #6A40C9 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  text-transform: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 10px 26px rgba(90,64,210,0.45),
    0 0 36px rgba(106,64,201,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.dr-lang .dr-lang-btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 12px 30px rgba(90,64,210,0.55),
    0 0 44px rgba(106,64,201,0.45);
}
.dr-lang .dr-lang-btn:active { transform: scale(0.97); }
.dr-lang .dr-lang-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}
.dr-lang .dr-lang-btn svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* — Panel de idiomas — */
.dr-lang .dr-lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 270px;
  max-height: min(440px, 62vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(16,14,30,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(106,64,201,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.dr-lang.open .dr-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dr-lang .dr-lang-menu::-webkit-scrollbar { width: 6px; }
.dr-lang .dr-lang-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
}

.dr-lang .dr-lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}
.dr-lang .dr-lang-item:hover,
.dr-lang .dr-lang-item:focus-visible {
  background: rgba(255,255,255,0.06);
  outline: none;
}
.dr-lang .dr-lang-item.active {
  background: rgba(106,64,201,0.28);
}
.dr-lang .dr-lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.dr-lang .dr-lang-item.active .dr-lang-code {
  background: linear-gradient(135deg, #5A4FD6 0%, #6A40C9 100%);
  color: #FFFFFF;
}
.dr-lang .dr-lang-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.dr-lang .dr-lang-native {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-lang .dr-lang-es {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-lang .dr-lang-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: #FFFFFF;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.dr-lang .dr-lang-item.active .dr-lang-check { opacity: 1; }

/* — Ocultar mientras el menú lateral móvil está abierto — */
body:has(.drawer-overlay.open) .dr-lang {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* — Tablet — */
@media (max-width: 768px) {
  .dr-lang {
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .dr-lang .dr-lang-btn {
    height: 50px;
    gap: 10px;
    padding: 0 22px 0 18px;
    font-size: 16px;
  }
  .dr-lang .dr-lang-btn svg { width: 23px; height: 23px; }
}

/* — Móvil (Android / iPhone) — */
@media (max-width: 480px) {
  .dr-lang {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .dr-lang .dr-lang-btn {
    height: 46px;
    gap: 8px;
    padding: 0 18px 0 15px;
    font-size: 15px;
  }
  .dr-lang .dr-lang-btn svg { width: 21px; height: 21px; }
  .dr-lang .dr-lang-menu {
    width: min(260px, calc(100vw - 28px));
    max-height: 60vh;
    max-height: 60dvh;
  }
  .dr-lang .dr-lang-item { padding: 11px 12px; }
}

/* — Pantallas muy pequeñas / horizontal baja — */
@media (max-height: 480px) {
  .dr-lang .dr-lang-menu { max-height: calc(100vh - 100px); }
}

@media (prefers-reduced-motion: reduce) {
  .dr-lang,
  .dr-lang .dr-lang-btn,
  .dr-lang .dr-lang-menu,
  .dr-lang .dr-lang-item { transition: none; }
}

@media print {
  .dr-lang { display: none !important; }
}

/* ══════════════════════════════════════════════
   DASHRUN X — Aliases y clases adicionales
   (Compatibilidad con nombres de clase X)
══════════════════════════════════════════════ */

/* Layout principal X (alias de .main-wrap) */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 32px 28px 48px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Chip X (sustituye a .vip-chip con estilo magenta) */
.x-chip {
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.16em;
  background: linear-gradient(110deg, #C023E8, #7B5FFF);
  color: #fff; padding: 2px 8px; border-radius: 20px;
  box-shadow: 0 0 10px rgba(192,35,232,0.45);
}

/* Texto logo sidebar X */
.sidebar-logo-text {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: 0.12em;
  color: var(--clr-white);
  display: flex; align-items: center; gap: 6px;
}

/* Botón hamburguesa topbar (alias de .hamburger) */
.topbar-menu-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-white);
}
.topbar-menu-btn svg { width: 22px; height: 22px; stroke: currentColor; }

/* Título y wallet del topbar móvil */
.topbar-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.00rem; letter-spacing: 0.10em;
  color: var(--clr-white);
  display: flex; align-items: center; gap: 6px;
}
.topbar-wallet {
  display: flex; align-items: center; gap: 6px;
}

/* Nav divider (alias de .nav-sep) */
.nav-divider {
  height: 1px; background: var(--clr-border);
  margin: 8px 20px;
}

/* Nav back (alias de .nav-back — usada como .nav-item-back) */
.nav-item-back {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px 14px;
  font-family: var(--font-body); font-size: 0.76rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-item-back:hover { color: rgba(255,255,255,0.65); }
.nav-item-back svg { width: 13px; height: 13px; stroke: currentColor; flex-shrink: 0; }

/* Wallet bar: grupo izquierdo y texto de wallet */
.wallet-bar-left {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.wallet-display {
  font-family: monospace; font-size: 0.76rem;
  color: var(--clr-white); word-break: break-all;
}

/* Status dot global (no sólo dentro de .wallet-bar) */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clr-green); box-shadow: 0 0 6px var(--clr-green);
  flex-shrink: 0; display: inline-block;
}
.status-dot.disconnected { background: var(--clr-red); box-shadow: 0 0 6px var(--clr-red); }
.status-dot.connected    { background: var(--clr-green); box-shadow: 0 0 6px var(--clr-green); }

/* Spinner grande (alias de .loader-row con spinner) */
.spinner-lg {
  width: 32px; height: 32px;
  border: 3px solid rgba(192,35,232,0.25); border-top-color: #C023E8;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Contenedor de carga con spinner */
.loader-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; gap: 12px;
  color: var(--clr-muted); font-size: 0.80rem; text-align: center;
}

/* Sección pequeña (usado en filter-bar como section-sm) */
.section-sm { margin-bottom: 14px; }

/* Tabla responsive (alias de .table-wrap) */
.table-responsive {
  overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%;
}

/* Tabla de datos (usa los estilos genéricos de table/thead/tbody ya definidos) */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.80rem;
  min-width: 480px;
}
.data-table thead th {
  text-align: left; padding: 8px 10px;
  font-family: var(--font-display); font-size: 0.70rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--clr-muted); border-bottom: 1px solid var(--clr-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.80);
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(192,35,232,0.04); }

/* Botón X (alias de .btn-vip con estilo magenta/morado) */
.btn-x {
  background: linear-gradient(110deg, #4F2BFF, #C023E8);
  color: var(--clr-white);
  box-shadow: 0 0 16px rgba(192,35,232,0.35), 0 4px 12px rgba(79,43,255,0.25);
}
.btn-x:hover { box-shadow: 0 0 26px rgba(192,35,232,0.55), 0 6px 18px rgba(79,43,255,0.38); }

/* Colores adicionales de stat-value */
.stat-value.green { color: var(--clr-green); }
.gold { color: var(--clr-gold); }
.green { color: var(--clr-green); }

/* Responsive: main-content en móvil */
@media (max-width: 700px) {
  .main-content {
    margin-left: 0;
    padding: 72px 16px 48px; /* 72px: deja espacio al topbar fijo */
  }
}
