/* 
 * CSS completo para el Sistema de Rifa
 * Incluye todas las clases de Tailwind necesarias
 */

/* Reset y estilos base */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Backgrounds y gradientes */
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-blue-50 {
  --tw-gradient-from: #eff6ff;
  --tw-gradient-to: rgb(239 246 255 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-indigo-100 {
  --tw-gradient-to: #e0e7ff;
}

.from-green-50 {
  --tw-gradient-from: #f0fdf4;
  --tw-gradient-to: rgb(240 253 244 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-blue-100 {
  --tw-gradient-to: #dbeafe;
}

.from-indigo-900 {
  --tw-gradient-from: #312e81;
  --tw-gradient-to: rgb(49 46 129 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-purple-900 {
  --tw-gradient-to: rgb(88 28 135 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(88 28 135), var(--tw-gradient-to);
}

.to-pink-900 {
  --tw-gradient-to: #831843;
}

/* Colores de fondo */
.bg-white { background-color: #ffffff; }
.bg-green-600 { background-color: #16a34a; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-red-600 { background-color: #dc2626; }
.bg-gray-500 { background-color: #6b7280; }
.bg-green-500 { background-color: #22c55e; }
.bg-red-500 { background-color: #ef4444; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-green-100 { background-color: #dcfce7; }
.bg-red-100 { background-color: #fee2e2; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-blue-50 { background-color: #eff6ff; }

/* Colores de texto */
.text-white { color: #ffffff; }
.text-gray-900 { color: #111827; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-blue-800 { color: #1e40af; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-red-600 { color: #dc2626; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-200 { color: #c7d2fe; }

/* Layout */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Flexbox */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

/* Spacing */
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-7xl { max-width: 80rem; }
.w-full { width: 100%; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-4 { width: 1rem; }
.w-3 { width: 0.75rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-4 { height: 1rem; }
.h-3 { height: 0.75rem; }
.h-12 { height: 3rem; }
.h-10 { height: 2.5rem; }

/* Padding */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }
.pr-3 { padding-right: 0.75rem; }
.pr-12 { padding-right: 3rem; }

/* Margin */
.m-4 { margin: 1rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }

/* Border radius */
.rounded-full { border-radius: 9999px; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

/* Shadows */
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }

/* Border */
.border { border-width: 1px; }
.border-blue-200 { border-color: #bfdbfe; }
.border-gray-300 { border-color: #d1d5db; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Effects */
.opacity-90 { opacity: 0.9; }
.opacity-70 { opacity: 0.7; }
.opacity-50 { opacity: 0.5; }

/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* Hover states */
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Focus states */
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus\:ring-indigo-500:focus { --tw-ring-color: #6366f1; }
.focus\:ring-green-500:focus { --tw-ring-color: #22c55e; }
.focus\:border-transparent:focus { border-color: transparent; }

/* Active states */
.active\:bg-green-600:active { background-color: #16a34a; }
.active\:scale-95:active { transform: scale(0.95); }

/* Transform */
.scale-95 { transform: scale(0.95); }
.scale-105 { transform: scale(1.05); }
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

/* Z-index */
.z-50 { z-index: 50; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Pointer events */
.pointer-events-none { pointer-events: none; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Select */
.select-none { user-select: none; }

/* Min width */
.min-w-0 { min-width: 0px; }

/* Responsive breakpoints */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
  .sm\:py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .sm\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
  .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .sm\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .sm\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:p-4 { padding: 1rem; }
  .sm\:p-3 { padding: 0.75rem; }
  .sm\:p-2 { padding: 0.5rem; }
  .sm\:mt-8 { margin-top: 2rem; }
  .sm\:mt-6 { margin-top: 1.5rem; }
  .sm\:mt-4 { margin-top: 1rem; }
  .sm\:mt-3 { margin-top: 0.75rem; }
  .sm\:mt-2 { margin-top: 0.5rem; }
  .sm\:mb-8 { margin-bottom: 2rem; }
  .sm\:mb-6 { margin-bottom: 1.5rem; }
  .sm\:mb-4 { margin-bottom: 1rem; }
  .sm\:mb-2 { margin-bottom: 0.5rem; }
  .sm\:ml-4 { margin-left: 1rem; }
  .sm\:ml-3 { margin-left: 0.75rem; }
  .sm\:mr-4 { margin-right: 1rem; }
  .sm\:mr-3 { margin-right: 0.75rem; }
  .sm\:mr-2 { margin-right: 0.5rem; }
  .sm\:space-y-0 > * + * { margin-top: 0; }
  .sm\:space-y-3 > * + * { margin-top: 0.75rem; }
  .sm\:space-x-2 > * + * { margin-left: 0.5rem; }
  .sm\:space-x-4 > * + * { margin-left: 1rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:gap-2 { gap: 0.5rem; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:flex-col { flex-direction: column; }
  .sm\:items-center { align-items: center; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:rounded-xl { border-radius: 0.75rem; }
  .sm\:rounded-2xl { border-radius: 1rem; }
  .sm\:rounded-lg { border-radius: 0.5rem; }
  .sm\:w-auto { width: auto; }
  .sm\:h-12 { height: 3rem; }
  .sm\:w-12 { width: 3rem; }
  .sm\:w-4 { width: 1rem; }
  .sm\:h-4 { height: 1rem; }
  .sm\:p-6 { padding: 1.5rem; }
  .sm\:p-4 { padding: 1rem; }
  .sm\:p-3 { padding: 0.75rem; }
  .sm\:p-2 { padding: 0.5rem; }
  .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .sm\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .sm\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
  .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .sm\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .sm\:left-auto { left: auto; }
  .sm\:mx-0 { margin-left: 0; margin-right: 0; }
  .sm\:block { display: block; }
  .sm\:hidden { display: none; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .lg\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
}

/* Estilos específicos para boletas */
.boleta {
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 0.25rem;
  border-radius: 0.25rem;
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.75rem;
  box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .boleta {
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-height: 3.5rem;
  }
}

.boleta:hover {
  transform: scale(1.05);
}

.boleta:active {
  transform: scale(0.95);
}

.boleta.processing {
  opacity: 0.7;
  pointer-events: none;
}

/* Mejorar espaciado en boletas del vendedor */
.boleta .numero-boleta {
  line-height: 1;
  margin-bottom: 2px;
}

.boleta .estado-boleta {
  line-height: 1;
  font-size: 0.7rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (min-width: 640px) {
  .boleta .estado-boleta {
    font-size: 0.75rem;
  }
}

/* Animaciones */
.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Modal */
.modal {
  backdrop-filter: blur(4px);
}

/* Mejorar experiencia táctil */
button, input {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Prevenir zoom en inputs en iOS */
input[type="text"], input[type="password"] {
  font-size: 16px;
}

/* Mejorar visibilidad de textos en botones */
a.text-white, button.text-white {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

a.text-white:hover, button.text-white:hover {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Botones con mejor contraste */
.bg-gradient-to-r {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-gradient-to-r:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Animaciones suaves */
* {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Barra de progreso */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-green-500 {
  --tw-gradient-from: #22c55e;
  --tw-gradient-to: rgb(34 197 94 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-indigo-600 {
  --tw-gradient-to: #4f46e5;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }