/* ═══════════════════════════════════════════════════════════
   POLISH — títulos bonitos + animaciones de entrada + pulido
   premium para TODAS las secciones (admin, recarga, perfil…)
   ═══════════════════════════════════════════════════════════ */

/* ─────── Animaciones base ─────── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { 0% { opacity: 0; transform: scale(.9); } 60% { transform: scale(1.03); } 100% { opacity: 1; transform: scale(1); } }
@keyframes shimmer  { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes floatY   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Entrada escalonada de los bloques de cada página (excepto el home propio) */
.container > *:not(.hx) {
  animation: fadeUp .5s cubic-bezier(.2,.9,.3,1.05) both;
}
.container > *:not(.hx):nth-child(1) { animation-delay: .02s; }
.container > *:not(.hx):nth-child(2) { animation-delay: .08s; }
.container > *:not(.hx):nth-child(3) { animation-delay: .14s; }
.container > *:not(.hx):nth-child(4) { animation-delay: .20s; }
.container > *:not(.hx):nth-child(5) { animation-delay: .26s; }
.container > *:not(.hx):nth-child(6) { animation-delay: .32s; }
.container > *:not(.hx):nth-child(n+7) { animation-delay: .36s; }

/* ─────── Títulos de página bonitos ─────── */
.page-head { position: relative; margin-bottom: 22px; }
.page-head h1, h1.page-title {
  position: relative;
  display: inline-block;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 6px;
  background: linear-gradient(120deg, #fff 0%, #fff 55%, var(--accent-hover) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* subrayado de acento animado bajo el título */
.page-head h1::after, h1.page-title::after {
  content: ""; position: absolute; left: 2px; bottom: -6px;
  width: 54px; height: 4px; border-radius: 4px;
  background: var(--accent-grad);
  box-shadow: 0 2px 12px var(--accent-soft);
  animation: growBar .6s cubic-bezier(.2,.9,.3,1.2) .2s both;
}
@keyframes growBar { from { width: 0; opacity: 0; } to { width: 54px; opacity: 1; } }
.page-desc { color: var(--text-secondary); font-size: .9rem; margin: 10px 0 0; }

/* Etiquetas de sección con guion de acento */
.section-label, .section-title {
  position: relative;
  font-size: .72rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 26px 0 12px;
  padding-left: 14px;
}
.section-label::before, .section-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.section-title { font-size: 1.05rem; text-transform: none; letter-spacing: -.2px; color: var(--text); }

/* Chip de créditos con glow */
.credit-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent-hover); font-weight: 800; font-size: .9rem;
  box-shadow: 0 6px 18px var(--accent-soft);
  animation: popIn .5s ease both;
}

/* ─────── Stat cards premium (admin) ─────── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 18px 18px 20px !important;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: fadeUp .5s cubic-bezier(.2,.9,.3,1.05) both;
}
.stat-cards .stat-card:nth-child(1) { animation-delay: .06s; }
.stat-cards .stat-card:nth-child(2) { animation-delay: .13s; }
.stat-cards .stat-card:nth-child(3) { animation-delay: .20s; }
.stat-cards .stat-card:nth-child(4) { animation-delay: .27s; }
/* barra de acento superior */
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px var(--accent-soft);
}
.stat-card:hover::before { transform: scaleX(1); }
.sc-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.sc-label svg { width: 18px; height: 18px; color: var(--accent); }
.sc-value {
  font-size: 2rem; font-weight: 800; line-height: 1;
  background: linear-gradient(120deg, #fff, var(--accent-hover));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─────── Menú de gestión admin premium ─────── */
.admin-menu { display: flex; flex-direction: column; gap: 10px; }
.admin-menu-item {
  position: relative;
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 14px 16px !important;
  color: var(--text) !important;
  text-decoration: none;
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
  overflow: hidden;
}
.admin-menu-item > svg:first-child {
  width: 40px; height: 40px; padding: 9px;
  border-radius: 11px; flex: 0 0 auto;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  transition: transform .2s;
}
.admin-menu-item:hover {
  transform: translateX(4px);
  border-color: var(--accent) !important;
  background: var(--bg-elevated) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.admin-menu-item:hover > svg:first-child { transform: scale(1.08) rotate(-4deg); }
.admin-menu-item:hover .menu-chevron { transform: translateX(4px); opacity: 1; }
.menu-chevron { transition: transform .2s, opacity .2s; color: var(--accent); }

/* ─────── Recarga: stepper y zona de subida ─────── */
.steps-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 22px; }
.step-item { display: flex; align-items: center; gap: 8px; opacity: .5; transition: opacity .3s; }
.step-item.active { opacity: 1; }
.step-num {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 800; font-size: .85rem;
  background: var(--bg-input); color: var(--text-muted);
  border: 1.5px solid var(--border); transition: all .3s;
}
.step-item.active .step-num {
  background: var(--accent-grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px var(--accent-soft);
}
.step-txt { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; }

.file-drop { transition: border-color .2s, background .2s, transform .2s, box-shadow .2s !important; }
.file-drop:hover {
  border-color: var(--accent) !important; color: var(--accent) !important;
  background: var(--accent-soft) !important;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.file-drop svg { animation: floatY 3s ease-in-out infinite; }

/* ─────── Estado vacío animado ─────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); animation: fadeIn .6s ease both; }
.empty-state svg { opacity: .5; margin-bottom: 10px; animation: floatY 3.5s ease-in-out infinite; }
.empty-state p { font-size: .9rem; }

/* ─────── Perfil ─────── */
.profile-card, .account-card { animation: fadeUp .5s ease both; }

/* ─────── Respeto accesibilidad ─────── */
@media (prefers-reduced-motion: reduce) {
  .container > *, .stat-card, .credit-chip, .empty-state, .file-drop svg,
  .page-head h1::after, h1.page-title::after { animation: none !important; }
}
