/* ============================================
   CSS MODERNO - AZUL MARINO PROFESIONAL
   Mobile First | Clean | UX Optimizado
============================================ */

:root {
  /* Paleta azul marino oscuro moderna */
  --bg-primary: #0a0e27;
  --bg-secondary: #0f1437;
  --bg-card: #141b3d;
  --bg-elevated: #1a2249;
  --bg-surface: rgba(255, 255, 255, 0.02);
  
  /* Textos - Alto contraste y legibilidad */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-disabled: #475569;
  
  /* Acentos modernos y vibrantes */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-secondary: #06b6d4;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-purple: #a37cff;
  
  /* Gradientes modernos */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.8) 100%);
  
  /* Bordes sutiles */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  
  /* Sombras profesionales */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.3);
  
  /* Radios modernos */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Espaciado sistemático - Mobile First */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  
  /* Transiciones suaves */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Blur effects */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
}

/* ============================================
   RESET Y BASE MODERNA
============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.eh-my-tickets-shell {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Fondo con patrón sutil */
.eh-my-tickets-shell::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.eh-my-tickets-enhanced {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
  padding: var(--space-4);
  padding-bottom: calc(var(--space-12) + env(safe-area-inset-bottom));
}

/* ============================================================
   HEADER DE TICKET · Versión Premium Beat4Pass
   Solo CSS · No cambia el HTML · Super elegante
============================================================ */

/* Contenedor general del header */
.eh-ticket-header {
  padding: 28px 20px;
  min-height: 160px;
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.25), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    inset 0 -40px 50px rgba(0, 0, 0, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.38);
  position: relative;
}

/* Borde superior con glow suave */
.eh-ticket-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 20px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  opacity: 0.55;
  box-shadow: 0 0 22px rgba(129, 140, 248, 0.65);
}

/* Imagen del evento: más elegante y con blur progresivo */
.eh-event-image img {
  filter: brightness(0.7) saturate(1.15);
  transform: scale(1.04);
  opacity: 0.8;
}

/* Overlay mucho más limpio */
.eh-ticket-header::before {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.1) 0%,
    rgba(15, 23, 42, 0.6) 45%,
    rgba(15, 23, 42, 0.95) 100%
  );
}

/* Título del evento */
.eh-event-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  color: #e5e7eb;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* Meta info (fecha, hora): más compacta */
.eh-event-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eh-meta-item {
  font-size: 0.9rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
}

.eh-meta-item i {
  color: #818cf8;
  font-size: 1.05rem;
}

/* Estado del ticket (ej: "Entrada", "VIP") */
.eh-ticket-type {
  top: 18px;
  right: 18px;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(30, 35, 65, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(10px);
  color: #a5b4fc;
}

/* Línea inferior estilo “ticket” */
.eh-ticket-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}



/* ============================================
   ESTADO VACÍO
============================================ */

.eh-empty-state {
  text-align: center;
  padding: var(--space-10);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  margin: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}

.eh-empty-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-card);
  opacity: 0.5;
}

.eh-empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-6);
  opacity: 0.6;
  position: relative;
}

.eh-empty-state h3 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 600;
  margin-bottom: var(--space-4);
  position: relative;
}

.eh-empty-state p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  position: relative;
}

/* ============================================
   TARJETAS DE TICKETS - UX OPTIMIZADO
============================================ */

.eh-tickets-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.eh-ticket-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  position: relative;
}

.eh-ticket-card:active {
  transform: scale(0.99);
}

.eh-ticket-card.has-wallet::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Header con imagen */
.eh-ticket-header {
  position: relative;
  padding: var(--space-6);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.eh-ticket-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 14, 39, 0.5) 50%,
    var(--bg-card) 100%
  );
  z-index: 1;
}

.eh-event-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.eh-event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s cubic-bezier(0.4, 0, 0.2, 1);
}

.eh-ticket-card:active .eh-event-image img {
  transform: scale(1.03);
}

.eh-event-info {
  position: relative;
  z-index: 2;
}

.eh-event-title {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
  line-height: 1.3;
  color: var(--text-primary);
}

.eh-event-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.eh-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.eh-meta-item i {
  color: var(--accent-primary);
  width: 16px;
  flex-shrink: 0;
}

.eh-ticket-status {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
}

.eh-ticket-type {
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: var(--blur-md);
  color: var(--accent-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-medium);
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   BODY DEL TICKET
============================================ */

.eh-ticket-body {
  padding: var(--space-6);
}

.eh-qr-section {
  margin-bottom: var(--space-6);
}

.eh-code-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eh-qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}

.eh-qr-image {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-md);
  background: rgb(17, 70, 185);
  padding: var(--space-3);
  box-shadow: var(--shadow-md);
}

.eh-qr-code-text {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.1em;
  text-align: center;
  width: 100%;
  max-width: 280px;
}

.eh-qr-instructions {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.eh-ticket-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ============================================
   WALLET SECTION
============================================ */

.eh-wallet-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-6);
  position: relative;
}

.eh-wallet-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-card);
  opacity: 0.3;
  pointer-events: none;
}

.eh-wallet-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.eh-wallet-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.eh-wallet-title i {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.eh-wallet-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.eh-wallet-balance {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.eh-wallet-balance:active {
  transform: scale(0.98);
}

.eh-balance-amount {
  display: block;
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
  line-height: 1;
}

.eh-balance-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.eh-wallet-refund-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-warning), #d97706);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.eh-wallet-refund-note {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

/* ============================================
   BOTONES MODERNOS - MOBILE FIRST
============================================ */

.eh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 48px;
  width: 100%;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.eh-btn i {
  font-size: 1.1rem;
}

.eh-btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* Botón Primary con gradiente */
.eh-btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.eh-btn-primary:active:not(:disabled) {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.eh-btn-primary:disabled {
  background: var(--bg-surface);
  color: var(--text-disabled);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Botón Outline */
.eh-btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--accent-primary);
}

.eh-btn-outline:active {
  background: rgba(59, 130, 246, 0.1);
}

/* ============================================
   MODALES MODERNOS
============================================ */

.eh-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.eh-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.eh-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--blur-md);
  z-index: -1;
}

.eh-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.eh-modal[aria-hidden="false"] .eh-modal-content {
  transform: translateY(0);
}

.eh-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.eh-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eh-modal-close {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eh-modal-close:active {
  background: var(--bg-elevated);
  transform: scale(0.95);
}

.eh-modal-body {
  padding: var(--space-6);
}

/* ============================================
   RESPONSIVE - TABLET & DESKTOP
============================================ */

@media (min-width: 640px) {
  .eh-my-tickets-enhanced {
    padding: var(--space-8) var(--space-6);
    max-width: 640px;
  }
  
  .eh-ticket-actions,
  .eh-wallet-actions {
    flex-direction: row;
  }
  
  .eh-btn {
    width: auto;
    min-width: 140px;
  }
  
  .eh-modal {
    align-items: center;
    padding: var(--space-4);
  }
  
  .eh-modal-content {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    max-width: 500px;
    transform: translateY(20px) scale(0.95);
  }
  
  .eh-modal[aria-hidden="false"] .eh-modal-content {
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 768px) {
  .eh-my-tickets-enhanced {
    max-width: 720px;
  }
  
  .eh-tickets-container {
    gap: var(--space-8);
  }
  
  .eh-ticket-header {
    min-height: 200px;
    padding: var(--space-8);
  }
  
  .eh-wallet-main {
    flex-direction: row;
    align-items: center;
  }
  
  .eh-wallet-balance {
    min-width: 200px;
  }
}

/* ============================================
   UTILIDADES & OPTIMIZACIONES
============================================ */

/* Scrollbar moderna */
.eh-modal-content::-webkit-scrollbar {
  width: 8px;
}

.eh-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.eh-modal-content::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

/* Focus states accesibles */
.eh-btn:focus-visible,
.eh-modal-close:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Animación de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eh-ticket-card,
.eh-stat-card {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.eh-ticket-card:nth-child(1) { animation-delay: 0.05s; }
.eh-ticket-card:nth-child(2) { animation-delay: 0.1s; }
.eh-ticket-card:nth-child(3) { animation-delay: 0.15s; }

/* Optimización para rendimiento */
.eh-event-image img {
  will-change: transform;
}

/* Mejora para dark mode nativo */
@media (prefers-color-scheme: dark) {
  .eh-my-tickets-shell {
    color-scheme: dark;
  }
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe area para móviles */
@supports (padding: max(0px)) {
  .eh-my-tickets-enhanced {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
}

/* =========================================================
 * OVERRIDES · Estilo Beat4Pass igual que el User Panel
 * PÉGALO AL FINAL de tu CSS actual
 * ======================================================= */

/* Paleta alineada con el user-panel glass */
:root {
  --bg-primary: #020617;
  --bg-secondary: #020617;
  --bg-card: rgba(15, 23, 42, 0.96);
  --bg-elevated: rgba(15, 23, 42, 0.98);
  --bg-surface: rgba(15, 23, 42, 0.9);

  --text-primary: #e5e7eb;
  --text-secondary: #cbd5e1;
  --text-muted: #9ca3af;
  --text-disabled: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-purple: #8b5cf6;
  --accent-danger: #f97373;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-card: radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.25), transparent 60%);
  --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.9) 100%);

  --border-subtle: rgba(148, 163, 184, 0.32);
  --border-medium: rgba(148, 163, 184, 0.55);
  --border-strong: rgba(148, 163, 184, 0.8);

  --shadow-md: 0 16px 38px rgba(15, 23, 42, 0.95);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.98);
  --shadow-glow: 0 0 28px rgba(129, 140, 248, 0.55);

  --radius-md: 18px;
  --radius-lg: 20px;
  --radius-xl: 22px;
}

/* Fondo igual que el panel de usuario */
.eh-my-tickets-shell {
  background: radial-gradient(circle at top, #020617 0, #000 70%);
}

/* Título principal un poco más “app” */
.eh-main-title {
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* Tarjeta de ticket en modo glass, como las cards del panel */
.eh-ticket-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.22), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border-radius: 22px;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
}

/* Header con overlay más limpio */
.eh-ticket-header::before {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.1) 0%,
    rgba(15, 23, 42, 0.65) 55%,
    rgba(15, 23, 42, 0.98) 100%
  );
}

/* Chip tipo de ticket alineado con el user-panel */
.eh-ticket-type {
  background: rgba(15, 23, 42, 0.96);
  border-color: var(--border-medium);
  color: var(--accent-primary);
}

/* Bloque QR estilo “glass purple” como el de user-panel */
.eh-qr-display {
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.22), transparent 55%),
    rgba(15, 23, 42, 0.98);
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Marco del QR más parecido al del panel (menos marco blanco) */
.eh-qr-image {
  width: 190px;
  height: 190px;
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.32), transparent 55%),
    #f9fafb;
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* Caja del saldo wallet en el mismo lenguaje visual */
.eh-wallet-balance {
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.22), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Botones primarios = misma pastilla morada que en el panel */
.eh-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.65);
  border-color: rgba(248, 250, 252, 0.15);
}

/* Outline más glass */
.eh-btn-outline {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.85);
}

/* Modales: fondo y content alineados con el resto */
.eh-modal-backdrop {
  background: radial-gradient(circle at 0% 0%, rgba(15, 23, 42, 0.9), rgba(0, 0, 0, 0.9));
}

.eh-modal-content {
  background:
    radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.98);
  border-color: var(--border-medium);
}

/* ============================================
   MODO COMPACTO · Ticket + QR
   (Pegar al final del CSS)
============================================ */

/* Menos aire general en el ticket */
.eh-ticket-header {
  padding: 16px 14px;
  min-height: 150px;
}

.eh-ticket-body {
  padding: 16px 14px;
}

/* Bloque QR más compacto */
.eh-qr-section {
  margin-bottom: 14px;
}

.eh-qr-display {
  padding: 14px 12px;
  gap: 10px;
  margin-bottom: 10px;
}

/* QR algo más pequeño para que todo respire */
.eh-qr-image {
  width: 150px;
  height: 150px;
  padding: 8px;
}

/* Código de texto: más pequeño, blanco y compacto */
.eh-qr-code-text {
  font-size: 0.8rem;         /* antes 1rem */
  padding: 6px 10px;         /* menos padding */
  color: #ffffff;            /* texto blanco */
  background: transparent;   /* sin caja tan grande */
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  max-width: 220px;
}

/* Texto de instrucciones más pequeño */
.eh-qr-instructions {
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Wallet + acciones un poco más recogido */
.eh-wallet-section {
  padding: 16px 14px 18px;
}

.eh-wallet-actions {
  gap: 8px;
  margin-bottom: 10px;
}

/* Botones ligeramente más bajos */
.eh-btn {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

/* Un poco menos de espacio entre tarjetas de ticket */
.eh-tickets-container {
  gap: 16px;
}

/* ============================================
   MODAL RECARGAR WALLET · Estilo Beat4Pass
============================================ */

/* Tamaño y contenedor */
.eh-modal-content.eh-modal-large {
  max-width: 480px;
  border-radius: 22px;
  border: 1px solid var(--border-medium);
  background:
    radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-lg);
}

/* Header del modal */
.eh-modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 18px 10px;
}

.eh-modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Cuerpo del modal */
.eh-modal-body {
  padding: 16px 18px 18px;
}

/* Layout general del contenido de recarga */
.eh-recharge-pos {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Subtítulo “Haz clic en las recargas…” */
.eh-recharge-pos h4 {
  margin-bottom: 10px !important;
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  font-weight: 500;
}

/* GRID de recargas */
.eh-topup-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tarjeta de recarga */
.eh-topup-option {
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.16), transparent 55%),
    rgba(15, 23, 42, 0.97);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.eh-topup-option:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

/* Estado seleccionado (por si el JS añade clase) */
.eh-topup-option.selected,
.eh-topup-option.is-selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.7);
}

/* Textos dentro de la tarjeta */
.eh-topup-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.eh-topup-price {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 2px;
}

.eh-topup-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hint “Clic para añadir” */
.eh-topup-add-hint {
  margin-top: 6px !important;
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.eh-topup-add-hint i {
  font-size: 0.9rem;
  color: var(--accent-primary);
}

/* Cesta / selección */
.eh-cart-section {
  margin-top: 18px !important;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.eh-cart-section h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.eh-cart-items {
  margin-bottom: 10px !important;
  max-height: 160px !important;
}

.eh-cart-empty {
  color: var(--text-muted) !important;
  font-size: 0.82rem;
}

/* Total */
.eh-cart-total {
  font-size: 0.9rem;
  margin-bottom: 10px !important;
  color: var(--text-secondary);
}

.eh-cart-total span {
  font-weight: 700;
  color: var(--text-primary);
}

/* Términos y condiciones */
.eh-terms-section {
  margin-bottom: 14px !important;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.eh-terms-section label {
  gap: 8px !important;
}

#eh-accept-terms {
  accent-color: #6366f1;
}

/* Botón de “Proceder al pago” centrado y compacto */
.eh-recharge-pos > div:last-child {
  text-align: center;
}

.eh-proceed-to-payment {
  padding: 10px 26px !important;
  font-size: 0.9rem;
  min-height: 44px;
}

/* Responsive: dos columnas para recargas en pantallas anchas */
@media (min-width: 640px) {
  .eh-topup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* ============================================
   FIX FUERTE DESKTOP · Ancho tipo móvil
   (user-panel + my-tickets dentro)
============================================ */

@media (min-width: 1024px) {
  /* Contenedor general del panel de usuario */
  .eh-user-panel-shell {
    display: flex;
    justify-content: center;
    padding-top: 16px;
    padding-bottom: 24px;
  }

  /* “Columna” central del panel */
  .eh-user-panel--advanced {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
  }

  /* Bloque de mis entradas dentro del panel */
  .eh-my-tickets-shell {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding-inline: 16px;
    overflow: visible;
    box-sizing: border-box;
  }

  .eh-my-tickets-enhanced {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding-inline: 0;
    box-sizing: border-box;
  }

  /* La tarjeta no puede sobresalir del “móvil” */
  .eh-ticket-card {
    width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
  }
}

/* Evitar cortes horizontales por si el tema mete algo */
body,
.wp-site-blocks,
.eh-user-panel-shell,
.eh-my-tickets-shell {
  overflow-x: hidden;
}

/* ============================================
   DESKTOP · Ticket más ancho + Wallet cómoda
============================================ */

/* 1) Aumentar ancho del bloque de tickets dentro del user-panel */
@media (min-width: 992px) {

  /* Columna central del panel */
  .eh-up.shell {
    max-width: 720px;    /* antes ~480/540, ahora más ancho */
    margin: 0 auto;
  }

  /* Card que contiene el shortcode de Mis Entradas */
  .eh-user-panel__card--embedded {
    padding: 0;          /* dejamos que el propio ticket gestione el padding */
  }

  /* Contenedor de Mis Entradas */
  .eh-my-tickets-shell,
  .eh-my-tickets-enhanced {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding-inline: 16px;
    box-sizing: border-box;
  }

  .eh-ticket-card {
    width: 100%;
    margin: 0 auto;
  }
}

/* 2) Wallet del evento: botones en fila y ocupando todo el ancho */
@media (min-width: 768px) {
  .eh-wallet-actions {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }

  .eh-wallet-actions .eh-btn {
    width: auto;
    flex: 1 1 0;
  }
}

/* ============================================
   USER PANEL RESPONSIVE FIX · Beat4Pass
   Mobile First · Optimizado para tickets + wallet
   ============================================ */

/* =========================================================
   1) FIX MOBILE · Wallet + Botones en pantalla visible
   ========================================================= */

@media (max-width: 767px) {
  
  /* Wallet Section: Layout optimizado móvil */
  .eh-wallet-section {
    padding: 14px 12px 16px;
  }

  .eh-wallet-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Título más compacto */
  .eh-wallet-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  /* BOTONES EN FILA (2x2 grid compacto) */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .eh-wallet-actions .eh-btn i {
    font-size: 0.95rem;
  }

  /* Saldo SIEMPRE visible arriba */
  .eh-wallet-balance {
    order: -1; /* Lo pone primero */
    padding: 12px 14px;
    margin-bottom: 8px;
  }

  .eh-balance-amount {
    font-size: 1.8rem;
    margin-bottom: 4px;
  }

  .eh-balance-label {
    font-size: 0.78rem;
  }

  /* Nota de devolución más compacta */
  .eh-wallet-refund-note {
    font-size: 0.78rem;
    padding-top: 10px;
    margin-top: 8px;
  }

  /* Badge de devolución pendiente */
  .eh-wallet-refund-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    margin-top: 8px;
  }
}

/* =========================================================
   2) FIX TABLET · Transición suave
   ========================================================= */

@media (min-width: 768px) and (max-width: 991px) {
  
  .eh-wallet-section {
    padding: 16px 14px 18px;
  }

  .eh-wallet-main {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 14px;
    align-items: start;
  }

  /* Columna izquierda: título + botones */
  .eh-wallet-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .eh-wallet-title {
    margin-bottom: 6px;
  }

  /* Botones en 2 columnas */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 44px;
  }

  /* Saldo a la derecha, compacto */
  .eh-wallet-balance {
    min-width: 200px;
    padding: 16px;
  }

  .eh-balance-amount {
    font-size: 2rem;
  }
}

/* =========================================================
   3) FIX DESKTOP · Layout óptimo sin scroll horizontal
   ========================================================= */

@media (min-width: 992px) {

  /* Contenedor principal centrado tipo móvil */
  .eh-user-panel-shell {
    display: flex;
    justify-content: center;
    padding: 24px 16px;
    overflow-x: hidden;
  }

  .eh-user-panel {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
  }

  .eh-up.shell {
    max-width: 680px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Wallet: botones en fila única */
  .eh-wallet-section {
    padding: 18px 16px 20px;
  }

  .eh-wallet-main {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: stretch;
  }

  /* Columna izquierda: título + botones apilados */
  .eh-wallet-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .eh-wallet-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  /* Botones en FILA horizontal */
  .eh-wallet-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .eh-wallet-actions .eh-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    font-size: 0.85rem;
  }

  /* Saldo al lado derecho, visible */
  .eh-wallet-balance {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 16px;
  }

  .eh-balance-amount {
    font-size: 2.2rem;
  }

  .eh-balance-label {
    font-size: 0.82rem;
  }

  /* Nota de devolución debajo de todo */
  .eh-wallet-refund-note {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   4) FIX DESKTOP EXTRA ANCHO · Más espacio
   ========================================================= */

@media (min-width: 1200px) {
  
  .eh-user-panel {
    max-width: 900px;
  }

  .eh-up.shell {
    max-width: 860px;
  }

  .eh-wallet-main {
    gap: 20px;
  }

  .eh-wallet-balance {
    width: 220px;
    padding: 20px 18px;
  }

  .eh-balance-amount {
    font-size: 2.5rem;
  }

  .eh-wallet-actions .eh-btn {
    min-height: 48px;
    font-size: 0.88rem;
  }
}

/* =========================================================
   5) TICKET CARD · Optimización responsive
   ========================================================= */

/* Mobile: header compacto */
@media (max-width: 767px) {
  .eh-ticket-header {
    padding: 12px 12px 10px;
    grid-template-columns: 56px 1fr auto;
    column-gap: 10px;
  }

  .eh-event-image {
    width: 56px !important;
    height: 56px !important;
  }

  .eh-event-title {
    font-size: 0.95rem;
  }

  .eh-event-meta {
    font-size: 0.78rem;
  }

  .eh-ticket-type {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Body del ticket */
  .eh-ticket-body {
    padding: 14px 12px 16px;
  }

  /* QR más pequeño en móvil */
  .eh-qr-display {
    padding: 12px 10px;
  }

  .eh-qr-image {
    width: 140px !important;
    height: 140px !important;
  }

  .eh-qr-code-text {
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  /* Botones de ticket */
  .eh-ticket-actions {
    gap: 8px;
  }

  .eh-ticket-actions .eh-btn {
    min-height: 42px;
    font-size: 0.82rem;
  }
}

/* Desktop: ticket más espacioso */
@media (min-width: 992px) {
  .eh-ticket-header {
    padding: 16px 16px 14px;
    grid-template-columns: 70px 1fr auto;
  }

  .eh-event-image {
    width: 70px !important;
    height: 70px !important;
  }

  .eh-ticket-body {
    padding: 18px 16px 20px;
  }

  .eh-qr-display {
    padding: 16px 14px;
  }

  .eh-qr-image {
    width: 180px !important;
    height: 180px !important;
  }
}

/* =========================================================
   6) MODAL RECARGA · Responsive
   ========================================================= */

/* Mobile: modal full width con padding */
@media (max-width: 767px) {
  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: calc(100% - 24px);
    max-width: 100%;
    margin: 12px;
    padding: 16px 14px 18px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-card {
    padding: 10px 12px;
  }
}

/* Tablet: 2 columnas */
@media (min-width: 768px) and (max-width: 991px) {
  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: min(520px, calc(100% - 32px));
    padding: 18px 16px 20px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Desktop: modal centrado */
@media (min-width: 992px) {
  .eh-user-panel #eh-recharge-modal {
    align-items: center;
    padding: 20px;
  }

  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: min(560px, 90%);
    max-height: 85vh;
    padding: 20px 18px 22px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* =========================================================
   7) CONTAINER FIX · Evitar scroll horizontal
   ========================================================= */

body,
.eh-user-panel-shell,
.eh-user-panel,
.eh-up.shell,
.eh-my-tickets-shell,
.eh-my-tickets-enhanced {
  overflow-x: hidden;
  box-sizing: border-box;
}

.eh-user-panel .eh-ticket-card,
.eh-user-panel .eh-wallet-section {
  max-width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   8) MEJORAS GENERALES UX
   ========================================================= */

/* Transiciones suaves */
.eh-wallet-balance,
.eh-wallet-actions .eh-btn,
.eh-ticket-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states accesibles */
.eh-wallet-actions .eh-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Hover mejorado en desktop */
@media (hover: hover) and (min-width: 992px) {
  .eh-wallet-actions .eh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45);
  }
}

/* Safe area para móviles con notch */
@supports (padding: max(0px)) {
  .eh-user-panel-shell {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   9) FIX WALLET DISABLED STATE
   ========================================================= */

.eh-wallet-balance.disabled {
  opacity: 0.6;
  position: relative;
}

.eh-wallet-balance.disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(148, 163, 184, 0.1) 10px,
    rgba(148, 163, 184, 0.1) 20px
  );
  pointer-events: none;
}

/* Botones deshabilitados */
.eh-wallet-actions .eh-btn:disabled {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--text-disabled);
  cursor: not-allowed;
  opacity: 0.5;
}

.eh-wallet-actions .eh-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ============================================
   USER PANEL RESPONSIVE FIX · Beat4Pass
   Mobile First · Optimizado para tickets + wallet
   ============================================ */

/* =========================================================
   1) FIX MOBILE · Wallet + Botones en pantalla visible
   ========================================================= */

@media (max-width: 767px) {
  
  /* Wallet Section: Layout optimizado móvil */
  .eh-wallet-section {
    padding: 14px 12px 16px;
  }

  .eh-wallet-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Título más compacto */
  .eh-wallet-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  /* BOTONES EN FILA (2x2 grid compacto) */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .eh-wallet-actions .eh-btn i {
    font-size: 0.95rem;
  }

  /* Saldo SIEMPRE visible arriba */
  .eh-wallet-balance {
    order: -1; /* Lo pone primero */
    padding: 12px 14px;
    margin-bottom: 8px;
  }

  .eh-balance-amount {
    font-size: 1.8rem;
    margin-bottom: 4px;
  }

  .eh-balance-label {
    font-size: 0.78rem;
  }

  /* Nota de devolución más compacta */
  .eh-wallet-refund-note {
    font-size: 0.78rem;
    padding-top: 10px;
    margin-top: 8px;
  }

  /* Badge de devolución pendiente */
  .eh-wallet-refund-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    margin-top: 8px;
  }
}

/* =========================================================
   2) FIX TABLET · Transición suave
   ========================================================= */

@media (min-width: 768px) and (max-width: 991px) {
  
  .eh-wallet-section {
    padding: 16px 14px 18px;
  }

  .eh-wallet-main {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 14px;
    align-items: start;
  }

  /* Columna izquierda: título + botones */
  .eh-wallet-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .eh-wallet-title {
    margin-bottom: 6px;
  }

  /* Botones en 2 columnas */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 44px;
  }

  /* Saldo a la derecha, compacto */
  .eh-wallet-balance {
    min-width: 200px;
    padding: 16px;
  }

  .eh-balance-amount {
    font-size: 2rem;
  }
}

/* =========================================================
   3) FIX DESKTOP · Layout óptimo sin scroll horizontal
   ========================================================= */

@media (min-width: 992px) {

  /* Contenedor principal centrado tipo móvil - MÁS ANCHO */
  .eh-user-panel-shell {
    display: flex;
    justify-content: center;
    padding: 24px 16px;
    overflow-x: hidden;
  }

  .eh-user-panel {
    max-width: 480px; /* Ancho tipo iPhone Pro Max */
    width: 100%;
    margin: 0 auto;
    overflow: visible; /* Importante */
  }

  .eh-up.shell {
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Tickets container */
  .eh-my-tickets-enhanced {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .eh-ticket-card {
    max-width: 100%;
  }

  /* Wallet: LAYOUT VERTICAL en desktop también */
  .eh-wallet-section {
    padding: 16px 14px 18px;
  }

  .eh-wallet-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
  }

  /* Título */
  .eh-wallet-title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  /* Saldo ARRIBA */
  .eh-wallet-balance {
    order: -1;
    width: 100%;
    padding: 16px 14px;
    box-sizing: border-box;
  }

  .eh-balance-amount {
    font-size: 2rem;
  }

  .eh-balance-label {
    font-size: 0.82rem;
  }

  /* Botones en grid 2x2 */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.82rem;
  }

  /* Nota de devolución */
  .eh-wallet-refund-note {
    margin-top: 10px;
  }

  .eh-wallet-refund-badge {
    margin-top: 10px;
  }
}

/* =========================================================
   4) FIX DESKTOP EXTRA ANCHO · Mantener layout móvil
   ========================================================= */

@media (min-width: 1200px) {
  
  /* Seguimos con layout móvil, solo un poco más ancho */
  .eh-user-panel {
    max-width: 520px;
  }

  .eh-up.shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .eh-wallet-section {
    padding: 18px 16px 20px;
  }

  /* Todo sigue en columna, solo aumentamos tamaños */
  .eh-wallet-balance {
    padding: 18px 16px;
  }

  .eh-balance-amount {
    font-size: 2.3rem;
  }

  .eh-wallet-actions .eh-btn {
    min-height: 46px;
    font-size: 0.85rem;
  }
}

/* =========================================================
   5) TICKET CARD · Optimización responsive
   ========================================================= */

/* Mobile: header compacto */
@media (max-width: 767px) {
  .eh-ticket-header {
    padding: 12px 12px 10px;
    grid-template-columns: 56px 1fr auto;
    column-gap: 10px;
  }

  .eh-event-image {
    width: 56px !important;
    height: 56px !important;
  }

  .eh-event-title {
    font-size: 0.95rem;
  }

  .eh-event-meta {
    font-size: 0.78rem;
  }

  .eh-ticket-type {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Body del ticket */
  .eh-ticket-body {
    padding: 14px 12px 16px;
  }

  /* QR más pequeño en móvil */
  .eh-qr-display {
    padding: 12px 10px;
  }

  .eh-qr-image {
    width: 140px !important;
    height: 140px !important;
  }

  .eh-qr-code-text {
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  /* Botones de ticket */
  .eh-ticket-actions {
    gap: 8px;
  }

  .eh-ticket-actions .eh-btn {
    min-height: 42px;
    font-size: 0.82rem;
  }
}

/* Desktop: ticket más espacioso */
@media (min-width: 992px) {
  .eh-ticket-header {
    padding: 16px 16px 14px;
    grid-template-columns: 70px 1fr auto;
  }

  .eh-event-image {
    width: 70px !important;
    height: 70px !important;
  }

  .eh-ticket-body {
    padding: 18px 16px 20px;
  }

  .eh-qr-display {
    padding: 16px 14px;
  }

  .eh-qr-image {
    width: 180px !important;
    height: 180px !important;
  }
}

/* =========================================================
   6) MODAL RECARGA · Responsive
   ========================================================= */

/* Mobile: modal full width con padding */
@media (max-width: 767px) {
  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: calc(100% - 24px);
    max-width: 100%;
    margin: 12px;
    padding: 16px 14px 18px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-card {
    padding: 10px 12px;
  }
}

/* Tablet: 2 columnas */
@media (min-width: 768px) and (max-width: 991px) {
  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: min(520px, calc(100% - 32px));
    padding: 18px 16px 20px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Desktop: modal centrado */
@media (min-width: 992px) {
  .eh-user-panel #eh-recharge-modal {
    align-items: center;
    padding: 20px;
  }

  .eh-user-panel #eh-recharge-modal .eh-modal-content {
    width: min(560px, 90%);
    max-height: 85vh;
    padding: 20px 18px 22px;
  }

  .eh-user-panel #eh-recharge-modal .eh-topup-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* =========================================================
   7) CONTAINER FIX · Evitar scroll horizontal
   ========================================================= */

body,
.eh-user-panel-shell,
.eh-user-panel,
.eh-up.shell,
.eh-my-tickets-shell,
.eh-my-tickets-enhanced {
  overflow-x: hidden;
  box-sizing: border-box;
}

.eh-user-panel .eh-ticket-card,
.eh-user-panel .eh-wallet-section {
  max-width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   8) MEJORAS GENERALES UX
   ========================================================= */

/* Transiciones suaves */
.eh-wallet-balance,
.eh-wallet-actions .eh-btn,
.eh-ticket-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states accesibles */
.eh-wallet-actions .eh-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Hover mejorado en desktop */
@media (hover: hover) and (min-width: 992px) {
  .eh-wallet-actions .eh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45);
  }
}

/* Safe area para móviles con notch */
@supports (padding: max(0px)) {
  .eh-user-panel-shell {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   9) FIX WALLET DISABLED STATE
   ========================================================= */

.eh-wallet-balance.disabled {
  opacity: 0.6;
  position: relative;
}

.eh-wallet-balance.disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(148, 163, 184, 0.1) 10px,
    rgba(148, 163, 184, 0.1) 20px
  );
  pointer-events: none;
}

/* Botones deshabilitados */
.eh-wallet-actions .eh-btn:disabled {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--text-disabled);
  cursor: not-allowed;
  opacity: 0.5;
}

.eh-wallet-actions .eh-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

@media (min-width: 992px) {
  
  .eh-wallet-section {
    padding: 16px 14px 18px;
  }

  .eh-wallet-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Saldo primero */
  .eh-wallet-balance {
    order: -1;
    width: 100%;
    padding: 16px 14px;
  }

  .eh-balance-amount {
    font-size: 2rem;
  }

  /* Título después */
  .eh-wallet-title {
    font-size: 1rem;
    margin-bottom: 8px;
    order: 0;
  }

  /* Botones al final en grid 2x2 */
  .eh-wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    order: 1;
  }

  .eh-wallet-actions .eh-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.82rem;
  }
}

/* ============================================
   FIX DESKTOP WALLET - Botones debajo del saldo
============================================ */

@media (min-width: 992px) {
  .eh-wallet-section {
    padding: 16px 14px 18px !important;
    max-width: 100%;
    overflow: hidden;
  }

  .eh-wallet-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  /* Saldo arriba */
  .eh-wallet-balance {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 14px !important;
    margin-bottom: 8px !important;
    box-sizing: border-box !important;
  }

  .eh-balance-amount {
    font-size: 2rem !important;
  }

  .eh-balance-label {
    font-size: 0.82rem !important;
  }

  /* Título después del saldo */
  .eh-wallet-title {
    order: 2 !important;
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }

  /* Botones en grid 2x2 debajo del título */
  .eh-wallet-actions {
    order: 3 !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  .eh-wallet-actions .eh-btn {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 0.82rem !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    flex: none !important;
  }

  /* Nota de devolución al final */
  .eh-wallet-refund-note {
    order: 4 !important;
    margin-top: 10px !important;
    padding-top: 12px !important;
  }

  .eh-wallet-refund-badge {
    margin-top: 10px !important;
  }

  /* Asegurar que no haya overflow horizontal */
  .eh-wallet-section * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Para pantallas muy anchas, mantener el mismo layout */
@media (min-width: 1200px) {
  .eh-wallet-section {
    padding: 18px 16px 20px !important;
  }

  .eh-wallet-balance {
    padding: 18px 16px !important;
  }

  .eh-balance-amount {
    font-size: 2.3rem !important;
  }

  .eh-wallet-actions .eh-btn {
    min-height: 46px ;
    font-size: 0.85rem ;
  }
}

/* Asegurar que el contenedor padre no cause overflow */
.eh-user-panel-shell,
.eh-user-panel,
.eh-up.shell,
.eh-my-tickets-shell,
.eh-my-tickets-enhanced {
  overflow-x: hidden ;
  max-width: 100% ;
}

/* Si persiste el problema, forzar el ancho máximo */
@media (min-width: 992px) {
  .eh-my-tickets-enhanced {
    max-width: 520px ;
    margin: 0 auto ;
    padding: 0 16px ;
  }
}

/* ============================================
   FIX QR CODE TEXT COLOR - Texto blanco
============================================ */

.eh-qr-code-text,
.eh-qr-code-text code {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: transparent !important;
}

/* Para asegurar que el texto sea blanco en todos los estados */
.eh-qr-code-text:active,
.eh-qr-code-text:focus,
.eh-qr-code-text:hover,
.eh-qr-code-text code:active,
.eh-qr-code-text code:focus,
.eh-qr-code-text code:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Si hay algún gradiente aplicado al texto, lo removemos */
.eh-qr-code-text {
  background-image: none !important;
}

/* Para el modo oscuro nativo */
@media (prefers-color-scheme: dark) {
  .eh-qr-code-text,
  .eh-qr-code-text code {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
}

.eh-ticket-attendee {
  margin-bottom: 10px;
}

.eh-att-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.eh-att-name {
  font-size: 0.82rem;
  color: #e5e7eb;
  font-weight: 500;
}

.eh-att-email {
  font-size: 0.8rem;
  color: #9ca3af;
}
