/*
  style.css - NexTramit
  Diseño premium, elegante y profesional para asesoría jurídica.
  Inspirado en los mejores despachos de abogados internacionales.
  Paleta de colores sofisticada con tonos corporativos y profesionales.
*/

:root {
  /* Colores principales - Paleta profesional premium */
  --primary: #1a365d;       /* Azul oscuro profesional */
  --primary-light: #2c5282; /* Azul medio para hover */
  --secondary: #a0aec0;     /* Gris azulado para elementos secundarios */
  --accent: #3182ce;        /* Azul brillante para acentos */
  --accent-dark: #2b6cb0;   /* Azul oscuro para hover de acentos */
  --background: #f8fafc;    /* Fondo muy claro */
  --background-alt: #edf2f7; /* Fondo alternativo */
  --text: #2d3748;          /* Texto principal oscuro pero no negro */
  --text-light: #4a5568;    /* Texto secundario */
  --text-white: #ffffff;    /* Texto sobre fondos oscuros */
  
  /* Colores de burbujas mejorados */
  --user-bubble: #ebf8ff;   /* Azul muy claro */
  --agent-bubble: #e6fffa;  /* Verde azulado muy claro */
  
  /* Colores de botones mejorados */
  --button: #3182ce;        /* Azul brillante */
  --button-hover: #2b6cb0;  /* Azul oscuro */
  --button-text: #ffffff;   /* Texto blanco */
  
  /* Colores de secciones - Más sofisticados */
  --extranjeria: #2b6cb0;   /* Azul para extranjería */
  --gestion: #2c7a7b;       /* Verde azulado para gestión */
  --leyes: #744210;         /* Marrón dorado para leyes */
  
  /* Efectos y sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  
  /* Transiciones */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Transiciones entre pantallas */
  .screen {
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center;
  }
  
  .screen.fade-in {
    animation: fadeInScreen 0.8s forwards;
  }
  
  .screen.fade-out {
    animation: fadeOutScreen 0.5s forwards;
  }
  
  @keyframes fadeInScreen {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  @keyframes fadeOutScreen {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateY(-20px) scale(0.98);
    }
  }
  
  /* Tamaños */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  
  /* Z-index */
  --z-behind: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-modal: 50;
  --z-overlay: 100;
}

/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== PANTALLA 1: BIENVENIDA ANIMADA ===== */
#welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
  animation: fadeIn 1.2s;
  overflow: hidden;
}

#welcome::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: -1;
  background: radial-gradient(circle, rgba(49, 130, 206, 0.03) 0%, rgba(26, 54, 93, 0.01) 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#welcome-logo {
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: logoAppear 1.7s forwards;
}

@keyframes logoAppear {
  0% { opacity: 0; transform: scale(0.95); }
  70% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#welcome-progress {
  width: 60px;
  height: 4px;
  background: #e2e6ef;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

#welcome-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  animation: barGrow 2.2s forwards;
}

@keyframes barGrow {
  from { width: 0%; }
  to { width: 100%; }
}

#welcome-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 120px;
  justify-content: center;
}
.anim-text {
  opacity: 0;
  position: absolute;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: opacity 0.5s, transform 0.5s;
}
#anim-asesoria {
  color: var(--accent);
  animation: showAnim 0.9s forwards;
  animation-delay: 0.2s;
}
#anim-nextramit {
  color: var(--primary);
  animation: showAnim 0.9s forwards;
  animation-delay: 1.2s;
}
#anim-gestoria {
  color: #7a8ca7;
  font-weight: 600;
  animation: showAnim 0.9s forwards;
  animation-delay: 2.2s;
}
@keyframes showAnim {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  70% { opacity: 1; transform: translateY(0) scale(1.06); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== PANTALLA 2: BURBUJAS FLOTANTES ===== */
#bubbles-screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.02) 0%, rgba(49, 130, 206, 0.05) 100%);
  overflow: hidden;
}

#bubbles-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  opacity: 0.07;
  z-index: 0;
  filter: saturate(0.8) contrast(1.1);
}

#bubbles-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 70% 80%, rgba(49, 130, 206, 0.05) 0%, rgba(26, 54, 93, 0.02) 70%);
  z-index: 1;
}

.app-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white);
  padding: 1.4rem 1.5rem 1.2rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.app-header h1 {
  font-size: 1.6rem;
  margin: 0;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 800;
  letter-spacing: 0.03em;
  position: relative;
  display: inline-block;
}

.app-header h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 3px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
.bubbles-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 2.5rem 1.5rem;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.bubbles-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Burbujas flotantes con diseño profesional */
.bubble-button {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  color: white;
  font-weight: 600;
  padding: 0;
  margin: 1rem;
  animation: float 6s ease-in-out infinite;
}

.bubble-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.5s ease;
  z-index: -1;
}

.bubble-button:hover::before {
  transform: scale(1.5);
}

.bubble-button:hover {
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.bubble-button:active {
  transform: scale(0.98);
}

.bubble-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.bubble-text {
  font-size: 1.1rem;
  font-weight: 700;
  max-width: 90%;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bubble-description {
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 90%;
  line-height: 1.2;
  text-align: center;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Tamaños y colores específicos para cada burbuja */
.bubble-button.extranjeria {
  background: var(--extranjeria-color);
  width: 140px;
  height: 140px;
  animation-delay: 0.5s;
}

.bubble-button.gestion {
  background: var(--gestion-color);
  width: 180px; /* Burbuja central más grande */
  height: 180px;
  z-index: 2;
  /* Estilo de caja fuerte/bóveda para la burbuja central */
  border: 3px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.bubble-button.leyes {
  background: var(--spanish-dark-red);
  width: 140px;
  height: 140px;
  animation-delay: 1s;
}
  box-shadow: 0 3px 10px rgba(49, 130, 206, 0.2);
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Efecto de carga elegante */
.loading-effect {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  animation: loading 2s infinite ease-in-out;
  transform-origin: left;
}

@keyframes loading {
  0% {
    transform: scaleX(0);
    opacity: 0.7;
  }
  50% {
    transform: scaleX(0.6);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0.7;
  }
}

/* Spinner de carga */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tarjetas informativas */
.info-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), 0 8px 15px rgba(0, 0, 0, 0.03);
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(49, 130, 206, 0.05) 0%, rgba(255, 255, 255, 0) 80%);
  pointer-events: none;
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text);
}

.info-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  color: white;
  margin-right: 0.8rem;
  box-shadow: 0 4px 10px rgba(49, 130, 206, 0.2);
}

/* Barra de progreso elegante */
.progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: progress-shine 1.5s infinite;
}

@keyframes progress-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.progress-percentage {
  font-weight: 600;
  color: var(--primary);
}

/* Tooltips elegantes */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: auto;
  min-width: 120px;
  max-width: 250px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: var(--primary-light) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Secciones de configuración */
.config-section {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.config-section:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.config-section h2 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
}

.config-section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 3px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.config-item {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.8rem;
  padding: 1rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.config-item:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.config-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
}

.config-item input, .config-item select, .config-item textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.config-item input:focus, .config-item select:focus, .config-item textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2);
  outline: none;
}

/* Tablas de datos elegantes */
.data-table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 600px;
}

.data-table th {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  position: relative;
}

.data-table th:first-child {
  border-top-left-radius: 1rem;
}

.data-table th:last-child {
  border-top-right-radius: 1rem;
}

.data-table td {
  padding: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 1rem;
}

.data-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 1rem;
}

.data-table .status-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.data-table .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.data-table .status-active {
  background-color: #48bb78;
  box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

.data-table .status-inactive {
  background-color: #f56565;
  box-shadow: 0 0 10px rgba(245, 101, 101, 0.5);
}

.data-table .status-pending {
  background-color: #ecc94b;
  box-shadow: 0 0 10px rgba(236, 201, 75, 0.5);
}

.data-table .action-cell {
  display: flex;
  gap: 0.5rem;
}

.data-table .action-button {
  background: rgba(49, 130, 206, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--primary);
}

.data-table .action-button:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 3px 10px rgba(49, 130, 206, 0.3);
}

/* Tarjetas de características o servicios */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1.2rem;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 20px rgba(49, 130, 206, 0.2);
  position: relative;
  overflow: hidden;
}

.feature-icon::after {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary);
}

.feature-card p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.feature-card .feature-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  transition: all 0.2s ease;
}

.feature-card .feature-link:hover {
  color: var(--primary-dark);
  gap: 0.8rem;
}

/* Alertas y notificaciones modernas */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  animation: slideInAlert 0.5s ease forwards;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

@keyframes slideInAlert {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
}

.alert-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-content {
  flex-grow: 1;
}

.alert-title {
  font-weight: 600;
  margin: 0 0 0.2rem 0;
  font-size: 1rem;
}

.alert-message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.alert-close:hover {
  opacity: 1;
}

/* Variantes de alertas */
.alert-info {
  background-color: rgba(49, 130, 206, 0.1);
  border: 1px solid rgba(49, 130, 206, 0.2);
}

.alert-info::before {
  background-color: var(--primary);
}

.alert-info .alert-icon {
  color: var(--primary);
}

.alert-success {
  background-color: rgba(72, 187, 120, 0.1);
  border: 1px solid rgba(72, 187, 120, 0.2);
}

.alert-success::before {
  background-color: #48bb78;
}

.alert-success .alert-icon {
  color: #48bb78;
}

.alert-warning {
  background-color: rgba(236, 201, 75, 0.1);
  border: 1px solid rgba(236, 201, 75, 0.2);
}

.alert-warning::before {
  background-color: #ecc94b;
}

.alert-warning .alert-icon {
  color: #ecc94b;
}

.alert-error {
  background-color: rgba(245, 101, 101, 0.1);
  border: 1px solid rgba(245, 101, 101, 0.2);
}

.alert-error::before {
  background-color: #f56565;
}

.alert-error .alert-icon {
  color: #f56565;
}

/* Badges y etiquetas */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge-sm {
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
}

.badge-lg {
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
  color: white;
}

.badge-success {
  background: linear-gradient(135deg, #68d391, #48bb78);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #fc8181, #f56565);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #fbd38d, #ecc94b);
  color: #744210;
}

.badge-info {
  background: linear-gradient(135deg, #90cdf4, #4299e1);
  color: white;
}

.badge-light {
  background: linear-gradient(135deg, #ffffff, #f7fafc);
  color: #1a202c;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-dark {
  background: linear-gradient(135deg, #4a5568, #2d3748);
  color: white;
}

.badge-outline {
  background: transparent;
  border: 1px solid;
}

.badge-outline.badge-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.badge-outline.badge-secondary {
  color: var(--secondary);
  border-color: var(--secondary);
}

.badge-outline.badge-success {
  color: #48bb78;
  border-color: #48bb78;
}

.badge-outline.badge-danger {
  color: #f56565;
  border-color: #f56565;
}

.badge-outline.badge-warning {
  color: #ecc94b;
  border-color: #ecc94b;
}

.badge-outline.badge-info {
  color: #4299e1;
  border-color: #4299e1;
}

.badge-with-icon {
  gap: 0.3rem;
}

.badge-icon {
  width: 14px;
  height: 14px;
}

/* Panel de estadísticas */
.stats-panel {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin: 2rem 0;
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.stats-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.stats-period {
  font-size: 0.875rem;
  color: var(--text-light);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-period-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-trend-up {
  color: #48bb78;
}

.stat-trend-down {
  color: #f56565;
}

.stats-chart {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: 250px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.chart-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Línea de tiempo */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-light), var(--primary));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(49, 130, 206, 0.2);
}

.timeline-item {
  padding: 1rem 2.5rem;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 2rem;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid var(--primary);
  border-radius: 50%;
  top: 1.5rem;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2);
  transition: all 0.3s ease;
}

.timeline-item:hover::after {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(49, 130, 206, 0.3);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item:nth-child(odd)::after {
  right: -10px;
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  border-style: solid;
  border-width: 10px;
  top: 1rem;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  border-color: transparent rgba(255, 255, 255, 0.8) transparent transparent;
  right: 100%;
}

.timeline-item:nth-child(even) .timeline-content::before {
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.8);
  left: 100%;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--primary);
}

.timeline-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.timeline-icon {
  width: 24px;
  height: 24px;
  position: absolute;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  z-index: 2;
  top: 1.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-icon {
  right: -12px;
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -12px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
  .bubbles-container {
    flex-direction: column;
    gap: 2rem;
  }
  
  .bubble-button.extranjeria,
  .bubble-button.leyes {
    width: 120px;
    height: 120px;
  }
  
  .bubble-button.gestion {
    width: 150px;
    height: 150px;
  }
  
  .bubble-icon {
    font-size: 2rem;
  }
  
  .bubble-text {
    font-size: 0.9rem;
  }
}

/* Estilos para dispositivos móviles pequeños */
@media (max-width: 480px) {
  .header {
    font-size: 1.1rem;
    padding: 1rem 0.5rem 0.6rem 0.5rem;
  }
  
  .bubble-button.extranjeria,
  .bubble-button.leyes {
    width: 100px;
    height: 100px;
  }
  
  .bubble-button.gestion {
    width: 130px;
    height: 130px;
  }
  
  .bubble-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .bubble-text {
    font-size: 0.8rem;
  }
  
  #voice-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Estilos para la integración de Chatbase */
.chatbase-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Ocultar elementos de Chatbase que no queremos mostrar */
.chatbase-bubble {
  display: none !important;
}

/* Estilo para iframe de Chatbase */
#chatbase-iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
}
