/**
 * Hello Plataforma · Dashboard Components
 *
 * Estilos de los 5 componentes del Dashboard Home:
 * - Alert pagos pendientes
 * - Earnings card oscura
 * - Stats grid
 * - Quick actions
 * - Recent activity
 */


/* ============================================================
   0. CONTENEDOR · MÁRGENES CONSISTENTES PARA TODO EL DASHBOARD
   ============================================================
   En móvil TODOS los componentes principales tienen margen lateral
   uniforme para que ninguno pegue al borde de la pantalla.
   En tablet+ se centran en el wrapper de Elementor.
*/
.hp-alert-pending,
.hp-earnings-card,
.hp-stats-grid,
.hp-quick-actions,
.hp-recent-activity {
  margin-left: 16px;
  margin-right: 16px;
}

@media (min-width: 768px) {
  .hp-alert-pending,
  .hp-earnings-card,
  .hp-stats-grid,
  .hp-quick-actions,
  .hp-recent-activity {
    margin-left: 0;
    margin-right: 0;
  }
}


/* ============================================================
   1. ALERT PAGOS PENDIENTES
   ============================================================ */

.hp-alert-pending {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--hp-gradient-purple-button);
  border-radius: var(--hp-radius-card);
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: var(--hp-space-4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 8px 24px -8px rgba(105, 73, 158, 0.40);
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              box-shadow var(--hp-duration-normal) var(--hp-ease);
  position: relative;
  overflow: hidden;
}

.hp-alert-pending::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hp-alert-pending:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 28px -6px rgba(105, 73, 158, 0.50);
  color: #FFFFFF;
}

.hp-alert-pending-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.hp-alert-pending-icon i {
  font-size: 22px;
  color: #FFFFFF;
}

.hp-alert-pending-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hp-alert-pending-title {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #FFFFFF;
  line-height: 1.3;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.hp-alert-pending-sub {
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 400;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}

.hp-alert-pending-chevron {
  font-size: 22px;
  color: #FFFFFF;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}


/* ============================================================
   2. EARNINGS CARD (HERO OSCURA · v1.1.11 rediseño premium)
   ============================================================ */

.hp-earnings-card {
  margin-bottom: var(--hp-space-4);
  padding: 24px 22px;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 22px;  /* Más redondeado · más premium */
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              box-shadow var(--hp-duration-normal) var(--hp-ease);

  /* Gradient oscuro más rico */
  background:
    radial-gradient(ellipse at top right, rgba(168, 135, 208, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(149, 117, 205, 0.14) 0%, transparent 55%),
    linear-gradient(140deg, #1A1124 0%, #0F0A18 100%);

  /* Borde sutil + sombras profundas */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.40),
    0 12px 36px -8px rgba(15, 14, 22, 0.55),
    0 4px 16px -4px rgba(105, 73, 158, 0.30);

  border: 1px solid rgba(168, 135, 208, 0.10);
  position: relative;
  overflow: hidden;
}

/* Brillo sutil arriba derecha (premium feel) */
.hp-earnings-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 191, 232, 0.18) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(8px);
}

/* Brillo sutil abajo izquierda */
.hp-earnings-card::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149, 117, 205, 0.16) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(6px);
}

.hp-earnings-card > * {
  position: relative;
  z-index: 1;
}

a.hp-earnings-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.40),
    0 20px 50px -8px rgba(15, 14, 22, 0.60),
    0 8px 24px -4px rgba(105, 73, 158, 0.40);
}

a.hp-earnings-card:hover .hp-earnings-period-pill {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(212, 191, 232, 0.40);
}

a.hp-earnings-card:hover .hp-earnings-period-pill i {
  transform: translateX(2px);
}

.hp-earnings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

/* Tag "Ganancias · Hoy" más legible */
.hp-earnings-card .hp-tag {
  color: rgba(212, 191, 232, 0.75) !important;
  letter-spacing: 1.2px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
}

.hp-earnings-period-pill {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(212, 191, 232, 0.25);
  color: #FFFFFF;
  padding: 6px 12px 6px 14px;
  border-radius: 99px;
  font-family: var(--hp-font-base);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color var(--hp-duration-normal) var(--hp-ease),
              border-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-earnings-period-pill i {
  font-size: 13px;
  transition: transform var(--hp-duration-normal) var(--hp-ease);
}

.hp-earnings-amount {
  font-family: var(--hp-font-base);
  font-size: 48px;
  font-weight: 800;  /* Más grueso · más impactante */
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -2px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.hp-earnings-currency {
  font-size: 18px;
  color: rgba(212, 191, 232, 0.55);
  font-weight: 500;
  margin-left: 6px;
  letter-spacing: 0;
}

.hp-earnings-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.hp-earnings-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 99px;
  font-family: var(--hp-font-base);
  font-size: 11.5px;
  font-weight: 700;
}

/* Verde brillante para % positivo · ALTA legibilidad sobre fondo oscuro */
.hp-earnings-change.is-positive {
  background: rgba(74, 222, 128, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #6EE89A;  /* Verde más claro · mejor contraste sobre negro */
}

/* Rojo brillante para % negativo */
.hp-earnings-change.is-negative {
  background: rgba(239, 100, 100, 0.18);
  border: 1px solid rgba(239, 100, 100, 0.35);
  color: #FF7A7A;  /* Rojo más claro · mejor contraste sobre negro */
}

/* Si el cambio es 0% (sin actividad), neutral lavanda */
.hp-earnings-change.is-positive[data-zero="1"] {
  background: rgba(212, 191, 232, 0.10);
  border: 1px solid rgba(212, 191, 232, 0.25);
  color: rgba(212, 191, 232, 0.85);
}

.hp-earnings-change i {
  font-size: 13px;
}

.hp-earnings-context {
  font-family: var(--hp-font-base);
  font-size: 11.5px;
  color: rgba(212, 191, 232, 0.65);
  font-weight: 500;
}


/* ============================================================
   3. STATS GRID
   ============================================================ */

.hp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--hp-space-6);
}

.hp-stat-card {
  background: var(--hp-bg-primary);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow:
    0 0 0 0.5px var(--hp-border-purple),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(105, 73, 158, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hp-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.40) 0%, rgba(168, 135, 208, 0.20) 100%);
  border: 0.5px solid rgba(149, 117, 205, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.hp-stat-icon i {
  font-size: 18px;
  color: var(--hp-purple-deep);
}

.hp-stat-value {
  font-family: var(--hp-font-base);
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-text-primary);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.5px;
}

.hp-stat-label {
  font-family: var(--hp-font-base);
  font-size: 10px;
  color: var(--hp-text-tertiary);
  font-weight: 500;
  margin: 2px 0 0;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.hp-stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--hp-font-base);
  font-size: 10px;
  font-weight: 600;
  margin: 4px 0 0;
}

.hp-stat-delta-positive {
  color: var(--hp-green-success);
}

.hp-stat-delta-negative {
  color: var(--hp-red-error);
}

.hp-stat-delta i {
  font-size: 11px;
}


/* ============================================================
   4. QUICK ACTIONS
   ============================================================ */

.hp-quick-actions {
  margin-bottom: var(--hp-space-6);
}

.hp-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--hp-space-3);
}

.hp-section-action {
  margin-left: auto;
  font-family: var(--hp-font-base);
  font-size: 11px;
  font-weight: 600;
  color: var(--hp-purple-deep);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.hp-section-action:hover {
  color: var(--hp-purple-anchor);
}

.hp-quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--hp-bg-primary);
  border-radius: 14px;
  text-decoration: none;
  border: 0.5px solid var(--hp-border-purple);
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              border-color var(--hp-duration-normal) var(--hp-ease),
              box-shadow var(--hp-duration-normal) var(--hp-ease);
}

.hp-quick-action:hover {
  border-color: rgba(149, 117, 205, 0.40);
  transform: translateX(2px);
  box-shadow: 0 4px 12px -4px rgba(105, 73, 158, 0.15);
}

.hp-quick-action--primary {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8FD 100%);
  border-color: rgba(149, 117, 205, 0.30);
  box-shadow:
    0 0 0 0.5px rgba(149, 117, 205, 0.25),
    0 4px 12px -4px rgba(105, 73, 158, 0.10);
}

.hp-quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.40) 0%, rgba(168, 135, 208, 0.20) 100%);
  border: 0.5px solid rgba(149, 117, 205, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hp-quick-action-icon i {
  font-size: 20px;
  color: var(--hp-purple-deep);
}

.hp-quick-action--primary .hp-quick-action-icon {
  background: var(--hp-gradient-purple-button);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(105, 73, 158, 0.25);
}

.hp-quick-action--primary .hp-quick-action-icon i {
  color: #FFFFFF;
}

.hp-quick-action-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hp-quick-action-label {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-text-primary);
  line-height: 1.3;
}

.hp-quick-action-sub {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  font-weight: 400;
  line-height: 1.3;
}

.hp-quick-action-chevron {
  font-size: 18px;
  color: var(--hp-text-tertiary);
  flex-shrink: 0;
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              color var(--hp-duration-normal) var(--hp-ease);
}

.hp-quick-action:hover .hp-quick-action-chevron {
  color: var(--hp-purple-deep);
  transform: translateX(2px);
}


/* ============================================================
   5. RECENT ACTIVITY
   ============================================================ */

.hp-recent-activity {
  margin-bottom: var(--hp-space-6);
}

.hp-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--hp-bg-primary);
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px var(--hp-border-purple);
}

.hp-activity-content {
  flex: 1;
  min-width: 0;
}

.hp-activity-text {
  font-family: var(--hp-font-base);
  font-size: 13px;
  margin: 0;
  color: var(--hp-text-primary);
  line-height: 1.35;
}

.hp-activity-text strong {
  font-weight: 600;
}

.hp-activity-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 3px 0 0;
  font-weight: 400;
  line-height: 1.2;
}

.hp-activity-meta i {
  font-size: 12px;
  color: var(--hp-purple-deep);
}

.hp-activity-amount {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}


/* ============================================================
   STAT SUB-LABEL (nuevo: "activos", "este mes")
   ============================================================ */

.hp-stat-sub {
  font-family: var(--hp-font-base);
  font-size: 10px;
  color: var(--hp-text-tertiary);
  margin: 2px 0 0;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: lowercase;
}


/* ============================================================
   COMING SOON GRID (Packs + Mensajes próximamente)
   ============================================================ */

.hp-coming-soon-section {
  margin-bottom: var(--hp-space-5);
}

.hp-coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.hp-coming-soon-card {
  position: relative;
  background: var(--hp-bg-primary);
  border: 0.5px dashed var(--hp-border-purple);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  opacity: 0.75;
  cursor: not-allowed;
}

.hp-coming-soon-card::after {
  content: 'PRONTO';
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--hp-font-base);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--hp-purple-deep);
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.40) 0%, rgba(168, 135, 208, 0.20) 100%);
  border: 0.5px solid rgba(149, 117, 205, 0.30);
  padding: 3px 7px;
  border-radius: 99px;
}

.hp-coming-soon-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--hp-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.hp-coming-soon-icon i {
  font-size: 18px;
  color: var(--hp-text-tertiary);
}

.hp-coming-soon-label {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.hp-coming-soon-sub {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 0;
  line-height: 1.3;
}


/* ============================================================
   ACTIVITY ITEM (TIMELINE · avatar con badge de tipo)
   ============================================================ */

.hp-activity-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-color, #9575CD) 0%, color-mix(in srgb, var(--avatar-color, #9575CD) 75%, black) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.hp-activity-type-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--hp-bg-primary);
  color: #FFFFFF;
}

.hp-activity-type-badge i {
  font-size: 9px;
  color: #FFFFFF;
}


/* ============================================================
   ACTIVITY EMPTY STATE
   ============================================================ */

.hp-activity-empty {
  background: var(--hp-bg-primary);
  border: 0.5px solid var(--hp-border-subtle);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
}

.hp-activity-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212, 191, 232, 0.35) 0%, rgba(168, 135, 208, 0.15) 100%);
  border: 0.5px solid rgba(149, 117, 205, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.hp-activity-empty-icon i {
  font-size: 26px;
  color: var(--hp-purple-deep);
}

.hp-activity-empty-title {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
}

.hp-activity-empty-sub {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-secondary);
  margin: 4px 0 0;
  line-height: 1.5;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   ACTIVITY AMOUNT (refinamiento: monto en morado)
   ============================================================ */

.hp-activity-amount {
  color: var(--hp-purple-deep) !important;
}


/* ============================================================
   STAT CARD COMO LINK (refinamiento: si es <a>, mostrar hover)
   ============================================================ */

a.hp-stat-card {
  text-decoration: none;
  color: inherit;
  transition: transform var(--hp-duration-normal) var(--hp-ease),
              box-shadow var(--hp-duration-normal) var(--hp-ease);
}

a.hp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(105, 73, 158, 0.15);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 768px) {
  .hp-stats-grid {
    gap: 12px;
  }

  .hp-stat-card {
    padding: 18px 14px;
  }

  .hp-stat-value {
    font-size: 26px;
  }

  .hp-earnings-card {
    padding: 22px 20px;
  }

  .hp-earnings-amount {
    font-size: 44px;
  }

  .hp-quick-action {
    padding: 16px 18px;
  }
}