/* =====================================================
   VJOX — ESTADÍSTICAS
   Archivo: analytics.css
===================================================== */

.analytics-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.analytics-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.analytics-modal__panel {
  width: min(100%, 520px);
  max-height: 90vh;
  overflow-y: auto;

  background: #16171a;
  border: 1px solid #2a2c31;
  border-radius: 22px;

  padding: 24px;

  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45);
}

/* HEADER */

.analytics-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 24px;
}

.analytics-modal__eyebrow {
  display: block;

  margin-bottom: 6px;

  color: #22c55e;

  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.analytics-modal__header h2 {
  margin: 0;

  color: #ffffff;

  font-size: 1.5rem;
  line-height: 1.2;
}

.analytics-modal__close {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  border: 1px solid #34363c;
  border-radius: 12px;

  background: #202126;
  color: #ffffff;

  cursor: pointer;
}

.analytics-modal__close:hover {
  background: #292b30;
}

/* CONTENIDO */

.analytics-modal__content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.analytics-stat {
  min-height: 110px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 18px;

  background: #0f0f10;

  border: 1px solid #292b30;
  border-radius: 16px;
}

.analytics-stat span {
  color: #8a8f98;

  font-size: 0.9rem;
  line-height: 1.3;
}

.analytics-stat strong {
  margin-top: 14px;

  color: #ffffff;

  font-size: 2rem;
  font-weight: 800;
}

/* Primera tarjeta destacada */

.analytics-stat:first-child {
  grid-column: 1 / -1;

  min-height: 125px;

  border-color: rgba(34, 197, 94, 0.35);

  background:
    linear-gradient(
      135deg,
      rgba(34, 197, 94, 0.12),
      rgba(56, 189, 248, 0.04)
    ),
    #0f0f10;
}

.analytics-stat:first-child strong {
  color: #22c55e;

  font-size: 2.5rem;
}

/* MÓVIL */

@media (max-width: 520px) {
  .analytics-modal {
    align-items: flex-end;

    padding: 10px;
  }

  .analytics-modal__panel {
    width: 100%;

    padding: 20px;

    border-radius: 22px 22px 16px 16px;
  }

  .analytics-modal__content {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-stat {
    min-height: 100px;

    padding: 15px;
  }

  .analytics-stat strong {
    font-size: 1.7rem;
  }
}