/* =============================================
   NEO PAD — Data-Pad / Tablet cyberpunk
   Estadisticas dinamicas con conteo, barras, anillo, ecualizador y red
============================================= */
.statpad {
  width: min(100%, 540px);
  background: rgba(5, 6, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), inset 0 0 30px rgba(0, 200, 255, 0.05);
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 14px;
}
.statpad::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
}

/* ─── Header tipo tablet ─── */
.statpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px;
  border-bottom: 1px solid rgba(0, 200, 255, 0.15);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(0, 200, 255, 0.85);
}
.statpad-h-left { display: flex; align-items: center; gap: 8px; }
.statpad-h-right { display: flex; align-items: center; gap: 9px; }
.statpad-h-right svg { display: block; flex-shrink: 0; }
.statpad-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00FF9D;
  box-shadow: 0 0 6px #00FF9D;
  animation: spBlink 1.6s ease-in-out infinite;
}
.sp-sig-live { animation: spBlink 1.2s ease-in-out infinite; }
.sp-online { color: #00FF9D; text-shadow: 0 0 6px rgba(0, 255, 157, 0.6); }

/* ─── Grid 2x2 ─── */
.statpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding-top: 12px;
}
.statpad-mod {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.sp-mod-side { flex-direction: row; align-items: center; justify-content: space-between; }

/* ─── Numeros y labels ─── */
.statpad-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}
.statpad-label {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-top: 6px;
}
.sp-num-green  { color: #00FF9D;   text-shadow: 0 0 10px rgba(0, 255, 157, 0.55); }
.sp-num-mag    { color: var(--magenta); text-shadow: 0 0 10px rgba(255, 94, 204, 0.55); }
.sp-num-cyan   { color: var(--cyan);   text-shadow: 0 0 10px rgba(0, 200, 255, 0.55); }
.sp-num-orange { color: #FF8A3D;   text-shadow: 0 0 10px rgba(255, 138, 61, 0.55); }

/* ─── Modulo 1: barra segmentada ─── */
.statpad-bar {
  display: flex;
  gap: 3px;
  height: 8px;
}
.statpad-bar i {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  background: rgba(0, 255, 157, 0.12);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.statpad.in-view .statpad-bar i {
  background: #00FF9D;
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.5);
  transform: scaleX(1);
}
.statpad.in-view .statpad-bar i:nth-child(odd)  { background: var(--cyan); box-shadow: 0 0 6px rgba(0, 200, 255, 0.5); }

/* ─── Modulo 2: anillo radar ─── */
.statpad-ring {
  flex-shrink: 0;
  transform-origin: 50% 50%;
  animation: spSpin 8s linear infinite;
}
.sp-ring-track { fill: none; stroke: rgba(255, 94, 204, 0.15); stroke-width: 5; }
.sp-ring-fill {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(255, 94, 204, 0.7));
  transition: stroke-dashoffset 1.6s ease 0.2s;
}

/* ─── Modulo 3: ecualizador ─── */
.statpad-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}
.statpad-eq i {
  width: 6px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.6);
  transform-origin: bottom;
  animation: spEq 1.1s ease-in-out infinite;
}
.statpad-eq i:nth-child(1) { height: 55%; animation-delay: 0s; }
.statpad-eq i:nth-child(2) { height: 100%; animation-delay: 0.1s; }
.statpad-eq i:nth-child(3) { height: 70%; animation-delay: 0.25s; }
.statpad-eq i:nth-child(4) { height: 90%; animation-delay: 0.05s; }
.statpad-eq i:nth-child(5) { height: 60%; animation-delay: 0.3s; }
.statpad-eq i:nth-child(6) { height: 85%; animation-delay: 0.15s; }
.statpad-eq i:nth-child(7) { height: 50%; animation-delay: 0.2s; }

/* ─── Modulo 4: red de nodos ─── */
.statpad-net { flex-shrink: 0; }
.statpad-net line {
  stroke: rgba(255, 138, 61, 0.45);
  stroke-width: 1.5;
  animation: spBlink 2.4s ease-in-out infinite;
}
.statpad-net line:nth-child(1) { animation-delay: 0s; }
.statpad-net line:nth-child(2) { animation-delay: 0.4s; }
.statpad-net line:nth-child(3) { animation-delay: 0.8s; }
.statpad-net line:nth-child(4) { animation-delay: 1.2s; }
.statpad-net line:nth-child(5) { animation-delay: 1.6s; }
.statpad-net line:nth-child(6) { animation-delay: 2s; }
.statpad-net .sp-node {
  fill: #FF8A3D;
  filter: drop-shadow(0 0 4px rgba(255, 138, 61, 0.8));
  animation: spBlink 2.4s ease-in-out infinite;
}

/* ─── Keyframes ─── */
@keyframes spBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}
@keyframes spSpin {
  to { transform: rotate(360deg); }
}
@keyframes spEq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
