:root {
  /* Core Foundation */
  --primary: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  --primary-glow: rgba(99, 102, 241, 0.5);
  --secondary: #0ea5e9;
  --accent: #f43f5e;

  /* Backgrounds */
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --bg-surface: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #4f46e5 0%, #1e1b4b 100%);

  /* Text */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* UI Elements */
  --border-light: #e2e8f0;
  --glass: rgba(255, 255, 255, 0.1);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg-gradient);
  height: 100vh;
  display: flex;
  overflow: hidden;
  color: var(--text-main);
}

/* Animations */
.animate-slide-in {
  animation: slideIn 0.4s var(--transition-smooth);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Base Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}


/* Overlay que cubre todo el módulo del carrito */
.transaction-overlay {
  position: absolute;
  /* O fixed si quieres cubrir TODA la ventana */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  /* Fondo blanco casi sólido */
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.transaction-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.overlay-content {
  text-align: center;
  max-width: 400px;
  padding: 20px;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Spinner Grande */
.spinner-large {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #0044CC;
  /* Tu color primario */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

/* Animación de Check SVG */
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #4bb71b;
  /* Verde éxito */
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #4bb71b;
  stroke-width: 3;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

/* Textos */
.transaction-id {
  background: #f0f4f8;
  padding: 8px 15px;
  border-radius: 4px;
  font-family: monospace;
  color: #555;
  margin: 15px 0;
  display: inline-block;
}

.state-error .error-icon {
  font-size: 50px;
  color: #dc3545;
  margin-bottom: 20px;
}

/* Utilidades */
.hidden {
  display: none !important;
}

/* Barra de progreso minimalista */
#loader-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, #6366f1, #a855f7);
  /* Tus colores de la agencia */
  z-index: 9999;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

@view-transition {
  navigation: auto;
}