@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.5.0/fonts/remixicon.css');

:root {
  --stitch-primary: #465fff;
  --stitch-primary-rgb: 70, 95, 255;
  --stitch-primary-hover: #3641f5;
  --stitch-primary-light: rgba(70, 95, 255, 0.1);
  --stitch-primary-dark: #2a31d8;
  --stitch-primary-glow: rgba(70, 95, 255, 0.35);

  --stitch-surface: #ffffff;
  --stitch-surface-secondary: #f6f7fa;
  --stitch-surface-tertiary: #eeeff4;
  --stitch-border: #e4e7ec;
  --stitch-border-light: rgba(0, 0, 0, 0.05);
  --stitch-border-hairline: rgba(0, 0, 0, 0.06);

  --stitch-text: #0b0d17;
  --stitch-text-secondary: #475467;
  --stitch-text-muted: #98a2b3;
  --stitch-text-inverse: #ffffff;

  --stitch-radius: 10px;
  --stitch-radius-lg: 16px;
  --stitch-radius-xl: 24px;
  --stitch-radius-2xl: 32px;
  --stitch-radius-3xl: 40px;

  --stitch-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --stitch-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
  --stitch-shadow-lg: 0 12px 24px -8px rgba(16, 24, 40, 0.1);
  --stitch-shadow-xl: 0 20px 48px -12px rgba(16, 24, 40, 0.15);
  --stitch-shadow-ambient: 0 24px 64px -16px rgba(16, 24, 40, 0.2);
  --stitch-shadow-glow: 0 8px 32px rgba(70, 95, 255, 0.25);

  --stitch-font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --stitch-font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  --stitch-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --stitch-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --stitch-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --stitch-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --stitch-transition: 0.25s var(--stitch-ease);
  --stitch-transition-slow: 0.5s var(--stitch-ease);
  --stitch-transition-spring: 0.45s var(--stitch-ease-spring);

  --stitch-nav-height: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  text-wrap: balance;
}

body {
  font-family: var(--stitch-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--stitch-surface-secondary);
  color: var(--stitch-text);
  letter-spacing: 0.01em;
}

::selection {
  background: var(--stitch-primary);
  color: #fff;
}

/* ═══ AMBIENT NOISE OVERLAY ═══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ═══ ENTRY ANIMATIONS ═══ */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--stitch-ease), transform 0.7s var(--stitch-ease);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--stitch-ease), transform 0.6s var(--stitch-ease);
}
.animate-in-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.animate-in-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.animate-in-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.animate-in-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.animate-in-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.animate-in-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.animate-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ DOUBLE-BEZEL CARD PATTERN — AWWWARDS SPEC ═══ */
.card-premium {
  background: transparent;
  border: none;
  border-radius: var(--stitch-radius-2xl);
  box-shadow: none;
  position: relative;
}
.card-premium > .card-premium-shell {
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--stitch-radius-2xl);
  padding: 2px;
  position: relative;
  overflow: hidden;
}
.card-premium > .card-premium-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0), rgba(255,255,255,0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-premium > .card-premium-shell > .card-premium-core {
  background: var(--stitch-surface);
  border-radius: calc(var(--stitch-radius-2xl) - 2px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(16, 24, 40, 0.06);
  transition: box-shadow 0.5s var(--stitch-ease), transform 0.5s var(--stitch-ease);
  position: relative;
  z-index: 1;
}
.card-premium > .card-premium-shell > .card-premium-core:hover {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 16px 32px -10px rgba(16, 24, 40, 0.14);
  transform: translateY(-2px);
}

/* ═══ BUTTONS ═══ */
.btn {
  font-family: var(--stitch-font);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--stitch-radius);
  transition: all var(--stitch-transition);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--stitch-transition);
  pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--stitch-primary);
  border-color: var(--stitch-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(70, 95, 255, 0.3);
}
.btn-primary:hover {
  background: var(--stitch-primary-hover);
  border-color: var(--stitch-primary-hover);
  box-shadow: 0 4px 14px rgba(70, 95, 255, 0.35);
  transform: translateY(-1px);
  color: #fff;
}
.btn-outline-primary {
  border: 1.5px solid var(--stitch-primary);
  color: var(--stitch-primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--stitch-primary-light);
  color: var(--stitch-primary-dark);
  border-color: var(--stitch-primary-dark);
}
.btn-danger {
  background: #f04438;
  border-color: #f04438;
  box-shadow: 0 1px 2px rgba(240, 68, 56, 0.3);
}
.btn-danger:hover {
  background: #d92d20;
  border-color: #d92d20;
  box-shadow: 0 4px 14px rgba(240, 68, 56, 0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--stitch-text-secondary);
  font-weight: 500;
}
.btn-ghost:hover {
  background: var(--stitch-border-light);
  color: var(--stitch-text);
}

/* ═══ BUTTON-IN-BUTTON PATTERN — AWWWARDS SPEC ═══ */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 0.35rem;
  position: relative;
}
.btn-with-icon.w-100,
.btn-with-icon.btn-block {
  justify-content: space-between;
}
.btn-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
  transition: transform 0.4s var(--stitch-ease-spring), background 0.3s var(--stitch-ease);
}
.btn-with-icon:hover .btn-icon-wrap {
  transform: translateX(3px) translateY(-1px) scale(1.08);
  background: rgba(255,255,255,0.3);
}
.btn-with-icon:active .btn-icon-wrap {
  transform: scale(0.95);
}

/* ═══ FORM CHECK ═══ */
.form-check-input {
  accent-color: var(--stitch-primary);
  cursor: pointer;
}
.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--stitch-primary-light);
}
.form-check-label {
  cursor: pointer;
}

/* ═══ FORM CONTROLS ═══ */
.form-control, .form-select {
  font-family: var(--stitch-font);
  border-radius: var(--stitch-radius);
  border: 1.5px solid var(--stitch-border);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--stitch-text);
  background: var(--stitch-surface);
  transition: all var(--stitch-transition);
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
}
.form-control:focus, .form-select:focus {
  border-color: var(--stitch-primary);
  box-shadow: 0 0 0 3px var(--stitch-primary-light), inset 0 1px 2px rgba(16, 24, 40, 0.04);
  outline: none;
}
.form-control:disabled, .form-control[readonly] {
  background: var(--stitch-surface-secondary);
  color: var(--stitch-text-muted);
}
.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--stitch-text-secondary);
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}
.form-text {
  font-size: 0.8125rem;
  color: var(--stitch-text-muted);
}

/* ═══ INPUT GROUP ═══ */
.input-group .form-control:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group .btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ═══ CARDS (Bootstrap overrides) ═══ */
.card {
  border: none;
  border-radius: var(--stitch-radius-lg);
  box-shadow: var(--stitch-shadow);
  background: var(--stitch-surface);
  transition: box-shadow var(--stitch-transition), transform var(--stitch-transition);
}
.card:hover {
  box-shadow: var(--stitch-shadow-lg);
}
.card-body {
  padding: 1.5rem;
}
.card-title {
  font-weight: 600;
  color: var(--stitch-text);
}

/* ═══ BADGES ═══ */
.badge {
  font-family: var(--stitch-font);
  font-weight: 600;
  border-radius: 6px;
  padding: 0.25em 0.625em;
}
.badge-primary {
  background: var(--stitch-primary-light);
  color: var(--stitch-primary-dark);
}

/* ═══ NAVIGATION ═══ */
.nav-link {
  font-family: var(--stitch-font);
  font-weight: 500;
  transition: color var(--stitch-transition);
}

/* ═══ ALERTS ═══ */
.alert {
  border-radius: var(--stitch-radius);
  border: none;
  font-weight: 500;
}

/* ═══ MODALS ═══ */
.modal-content {
  border: none;
  border-radius: var(--stitch-radius-xl);
  box-shadow: var(--stitch-shadow-xl);
  background: var(--stitch-surface);
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid var(--stitch-border-hairline);
  padding: 1.5rem 1.75rem;
}
.modal-body {
  padding: 1.75rem;
}
.modal-footer {
  border-top: 1px solid var(--stitch-border-hairline);
  padding: 1.25rem 1.75rem;
}
.modal-backdrop.show {
  opacity: 0.4;
}

/* ═══ DIVIDER ═══ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stitch-border), transparent);
  margin: 1.5rem 0;
}

/* ═══ TEXT UTILITIES ═══ */
.text-muted {
  color: var(--stitch-text-muted) !important;
}
.text-secondary {
  color: var(--stitch-text-secondary) !important;
}
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* ═══ BOTTOM NAV (GLASS PILL) ═══ */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 430px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-radius: var(--stitch-radius-2xl) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0.35rem 0.5rem;
  z-index: 1000;
  font-family: var(--stitch-font);
}
.bottom-nav .container-fluid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0;
}
.bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.6rem;
  font-size: 0.65rem;
  color: var(--stitch-text-muted);
  text-decoration: none;
  transition: color var(--stitch-transition);
  border-radius: var(--stitch-radius);
  position: relative;
}
.bottom-nav .nav-link:hover {
  color: var(--stitch-primary);
}
.bottom-nav .nav-link i, .bottom-nav .nav-link .ri-lg {
  font-size: 1.3rem;
  margin-bottom: 2px;
  transition: transform var(--stitch-transition);
}
.bottom-nav .nav-link:hover i {
  transform: translateY(-1px);
}
.bottom-nav .nav-link.active {
  color: var(--stitch-primary) !important;
}
.bottom-nav .nav-link.active i {
  color: var(--stitch-primary);
}
.bottom-nav .nav-link.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--stitch-primary);
}
.bottom-nav .nav-jugada-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stitch-primary), var(--stitch-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(70, 95, 255, 0.3);
  transition: transform var(--stitch-transition-spring), box-shadow var(--stitch-transition);
  margin-top: -12px;
}
.bottom-nav .nav-jugada-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(70, 95, 255, 0.4);
}
.bottom-nav .nav-jugada-btn:active {
  transform: scale(0.95);
}

/* ═══ MICRO-INTERACTIONS ═══ */
.hover-lift {
  transition: transform var(--stitch-transition), box-shadow var(--stitch-transition);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--stitch-shadow-lg);
}
.hover-lift:active {
  transform: translateY(0);
}
.hover-glow {
  transition: box-shadow var(--stitch-transition);
}
.hover-glow:hover {
  box-shadow: var(--stitch-shadow-glow);
}

/* ═══ SKELETON LOADER ═══ */
.skeleton {
  background: linear-gradient(90deg, var(--stitch-border) 25%, #f0f2f5 50%, var(--stitch-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--stitch-radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 576px) {
  .card-body { padding: 1.25rem; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .bottom-nav { bottom: 12px; width: calc(100% - 24px); }
}

/* ═══ RESULTADOS ═══ */
.resultado-card .card {
  padding: 10px;
  border-radius: var(--stitch-radius-lg);
  box-shadow: var(--stitch-shadow);
  transition: all var(--stitch-transition);
}
.resultado-card .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--stitch-shadow-lg);
}
.resultado-card .card-body { padding: 10px; }
.resultado-card h6 {
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}
.resultado-card .numero-box {
  width: 45px; height: 45px; font-size: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.loteria-container {
  border: none;
  border-radius: var(--stitch-radius-lg);
  background: var(--stitch-surface);
  box-shadow: var(--stitch-shadow);
}
.loteria-img {
  max-height: 45px;
  object-fit: contain;
}

/* ═══ APPLE BUTTONS (compatibilidad con Tarjeta Digital) ═══ */
.apple-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; font-family: var(--stitch-font); font-weight: 600;
  border-radius: var(--stitch-radius);
  transition: all var(--stitch-transition); cursor: pointer;
  border: none; text-decoration: none; outline: none;
  position: relative;
  overflow: hidden;
}
.apple-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity var(--stitch-transition);
  pointer-events: none;
}
.apple-btn:hover::after { opacity: 1; }
.apple-btn:active { transform: scale(0.97); }
.apple-btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
.apple-btn-primary {
  background: linear-gradient(135deg, var(--stitch-primary), #5b6eff);
  color: #fff;
  box-shadow: 0 1px 2px rgba(70,95,255,0.3);
}
.apple-btn-primary:hover {
  box-shadow: 0 4px 14px rgba(70,95,255,0.35);
  color: #fff;
}
.apple-btn-outline {
  background: transparent; color: var(--stitch-text-secondary);
  border: 1.5px solid var(--stitch-border);
}
.apple-btn-outline:hover { border-color: var(--stitch-primary); color: var(--stitch-primary); background: var(--stitch-primary-light); }
.apple-btn-outline.active { background: linear-gradient(135deg, var(--stitch-primary), #5b6eff); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(70,95,255,0.3); }
.apple-btn-warning {
  background: var(--stitch-primary-light); color: var(--stitch-primary);
}
.apple-btn-warning:hover { background: var(--stitch-primary); color: #fff; }
.apple-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16,185,129,0.3);
}
.apple-btn-success:hover {
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  color: #fff;
}
.apple-btn-glass {
  background: rgba(0,0,0,0.04);
  color: var(--stitch-text-secondary);
  border: 1px solid var(--stitch-border-hairline);
}
.apple-btn-glass:hover {
  background: rgba(0,0,0,0.08);
  color: var(--stitch-text);
}
.apple-btn-info {
  background: rgba(70,95,255,0.08); color: var(--stitch-primary);
}
.apple-btn-info:hover { background: var(--stitch-primary); color: #fff; }
.apple-btn-icon-only { width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 50%; }

/* ═══ APPLE NOTIFICATION (compatibilidad) ═══ */
#appleNotificationOverlay {
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(0,0,0,0.5); display: none;
  align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#appleNotificationOverlay.show { display: flex; }
#appleNotificationModal {
  background: #fff; border-radius: var(--stitch-radius-xl);
  padding: 1.5rem; max-width: 340px; width: 100%;
  text-align: center; box-shadow: var(--stitch-shadow-xl);
  animation: fadeUp 0.4s var(--stitch-ease);
  border: 1px solid rgba(255,255,255,0.5);
}
.apple-notification-icon { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 1rem; }
.apple-notification-content h4 { font-weight: 600; font-size: 1rem; color: var(--stitch-text); margin-bottom: 0.5rem; }
.apple-notification-content p { font-size: 0.9rem; color: var(--stitch-text-secondary); margin-bottom: 1.25rem; }
#appleNotificationButton {
  background: linear-gradient(135deg, var(--stitch-primary), #5b6eff);
  color: #fff; border: none;
  border-radius: var(--stitch-radius); padding: 0.5rem 1.5rem;
  font-weight: 600; font-family: var(--stitch-font); cursor: pointer;
  transition: all var(--stitch-transition);
}
#appleNotificationButton:hover { box-shadow: 0 4px 14px rgba(70,95,255,0.35); transform: translateY(-1px); }

/* ═══ ALPINE ═══ */
[x-cloak] { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ AUTH BACKGROUND ═══ */
@keyframes auth-breathe-a {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(-20px, 20px); }
}
@keyframes auth-breathe-b {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.12) translate(16px, -16px); }
}

.auth-bg {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #f6f7fa 0%, #eeeff4 50%, #e8eaf0 100%);
  position: relative;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70,95,255,0.08), transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  animation: auth-breathe-a 9s ease-in-out infinite;
}
.auth-bg::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70,95,255,0.05), transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  animation: auth-breathe-b 11s ease-in-out infinite;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.6s var(--stitch-ease);
}
.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--stitch-primary), var(--stitch-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(70,95,255,0.25);
}
.auth-logo svg {
  width: 30px;
  height: 30px;
  color: #fff;
}

/* ═══ PREMIUM TOAST ═══ */
.toast-premium {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 99999;
  background: var(--stitch-text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--stitch-radius-lg);
  font-family: var(--stitch-font);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  opacity: 0;
  transition: transform 0.35s var(--stitch-ease), opacity 0.35s var(--stitch-ease);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  white-space: nowrap;
}
.toast-premium.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-premium.toast-danger {
  background: #dc2626;
}
.toast-premium.toast-warning {
  background: #f59e0b;
  color: var(--stitch-text);
}
.toast-premium.toast-success {
  background: #10b981;
}

/* ═══ PREMIUM CARD VIEW (CLIENT) ═══ */
.card-client-viewport {
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  padding-bottom: 90px;
}
.card-header-client {
  background: linear-gradient(135deg, var(--stitch-primary) 0%, #3a4af0 60%, var(--stitch-primary-dark) 100%);
  color: #fff;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
}
.card-header-client::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}
.card-header-client .header-left {
  max-width: 70%;
  min-width: 0;
}
.card-header-client .header-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.avatar-client { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); object-fit: cover; flex-shrink: 0; }
.balance-badge { font-size: 1.1rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ═══ NUMBERS GRID PREMIUM ═══ */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  max-width: 100%;
}
@media (max-width: 430px) {
  .numbers-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; }
}
.number-ball {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(0.65rem, 2.2vw, 0.95rem);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(148, 163, 184, 0.65);
  color: #0f172a;
  background: radial-gradient(circle at 30% 20%, #f9fafb, #e5e7eb);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(148,163,184,0.35) inset,
    0 4px 8px rgba(15,23,42,0.18);
  transition: transform 0.22s var(--stitch-ease), box-shadow 0.22s var(--stitch-ease), background 0.22s var(--stitch-ease), border-color 0.22s var(--stitch-ease), color 0.22s var(--stitch-ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
.number-ball::after {
  content: '';
  position: absolute;
  inset: 16%;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.9), rgba(255,255,255,0));
  opacity: 0.9;
  pointer-events: none;
}
.number-ball:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(148,163,184,0.4) inset,
    0 8px 18px rgba(15,23,42,0.25);
  border-color: rgba(79,70,229,0.7);
}
.number-ball.selected {
  color: #f9fafb;
  box-shadow:
    0 0 0 1px rgba(15,23,42,0.15),
    0 0 0 4px rgba(59,130,246,0.35),
    0 14px 30px rgba(15,23,42,0.45);
  animation: numberPulse 620ms var(--stitch-ease-out);
}
.number-ball.selected::after {
  opacity: 1;
  background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.98), rgba(255,255,255,0.1));
}

@keyframes numberPulse {
  0% { transform: scale(0.94); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1.0); }
}

/* ═══ MONTO CIRCLES PREMIUM ═══ */
.monto-circles-wrap {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  padding: 0.5rem 0.25rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.monto-circles-wrap::-webkit-scrollbar { display: none; }
.monto-circle {
  flex: 0 0 auto;
  width: clamp(44px, 10vw, 50px);
  height: clamp(44px, 10vw, 50px);
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  color: var(--stitch-primary);
  background: radial-gradient(circle at 30% 20%, #fff, var(--stitch-primary-light));
  border: 1.5px solid var(--stitch-primary);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 6px rgba(15,23,42,0.12);
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s var(--stitch-ease-spring), box-shadow 0.25s var(--stitch-ease), border-color 0.25s var(--stitch-ease), color 0.25s var(--stitch-ease), background 0.25s var(--stitch-ease);
  -webkit-tap-highlight-color: transparent;
}
.monto-circle:hover {
  background: linear-gradient(135deg, var(--stitch-primary), #5b6eff);
  color: #fff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(70, 95, 255, 0.35);
  border-color: transparent;
}
.monto-circle:active { transform: scale(0.95); }

/* ═══ TICKET PREVIEW PREMIUM ═══ */
.ticket-preview {
  max-width: 100%;
  margin: 0 auto 0.75rem;
  border-radius: var(--stitch-radius-lg);
  overflow: hidden;
  background: var(--stitch-surface);
  box-shadow: 0 4px 20px rgba(16,24,40,0.08);
  border: 1px solid var(--stitch-border-hairline);
}
.ticket-preview .ticket-preview-header {
  background: linear-gradient(135deg, var(--stitch-primary), var(--stitch-primary-dark));
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.ticket-preview .ticket-preview-body { padding: 0.75rem; }
.ticket-preview .ticket-preview-plays { border-top: 1px dashed var(--stitch-border); padding-top: 0.5rem; }
.ticket-preview .ticket-preview-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
}
.ticket-preview .ticket-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ticket-preview .ticket-preview-total {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--stitch-border);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ═══ LOTTERY CAROUSEL PREMIUM ═══ */
.lottery-list-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.4rem 0.35rem;
  margin: 0;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lottery-list-horizontal::-webkit-scrollbar { display: none; }
.lottery-list-horizontal .lottery-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: min-content;
  white-space: nowrap;
  padding: 0.4rem 0.65rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  color: #475569;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 2px 8px rgba(15,23,42,0.08);
  transition: transform 0.22s var(--stitch-ease), box-shadow 0.22s var(--stitch-ease), border-color 0.22s var(--stitch-ease), color 0.22s var(--stitch-ease);
  min-height: 36px;
}
.lottery-list-horizontal .lottery-item:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 1px 0 rgba(255,255,255,0.95) inset, 0 6px 18px rgba(15,23,42,0.14);
  border-color: rgba(79, 70, 229, 0.45);
  color: #4338ca;
}
.lottery-list-horizontal .lottery-item.active {
  background: linear-gradient(135deg, var(--stitch-primary), #5b6eff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 4px 14px rgba(70,95,255,0.4);
}
.lottery-list-horizontal .lottery-item.active:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 8px 20px rgba(70,95,255,0.45);
}

/* ═══ EYEBROW BADGE ═══ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: var(--stitch-primary-light);
  color: var(--stitch-primary);
  margin-bottom: 0.75rem;
}

/* ═══ MACRO-WHITESPACE ═══ */
.section-xl { padding: 4rem 0; }
.section-lg { padding: 3rem 0; }
.gap-xl { gap: 2rem; }
.gap-2xl { gap: 3rem; }

/* ═══ UTILITIES ═══ */
.min-w-0 { min-width: 0; }
.text-balance { text-wrap: balance; }
.overflow-ellipsis { text-overflow: ellipsis; }
