/* ===== ESTILOS SIMPLIFICADOS PARA AUTOMATIZACIONES ===== */
:root {
    /* Colores principales de AutomatIA */
    --primary-color: #06B6D4;
    --primary-light: #0891B2;
    --primary-lighter: #164E63;
    --accent-color: #06B6D4;
    --dark-color: #0F172A;
    --dark-light: #1E293B;
    --neutral-color: #94A3B8;
    --neutral-light: #F8FAFC;
    --light-color: #1E293B;
    --white-color: #FFFFFF;
    
    /* Colores funcionales */
    --success-color: #10B981;
    --success-hover: #059669;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    
    /* Grises para contraste */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(11, 9, 10, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(11, 9, 10, 0.15), 0 2px 4px -2px rgba(11, 9, 10, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(11, 9, 10, 0.2), 0 4px 6px -4px rgba(11, 9, 10, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(11, 9, 10, 0.25), 0 8px 10px -6px rgba(11, 9, 10, 0.1);
    
    /* Bordes y transiciones */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header de la página */
.automation-header {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  text-align: center;
  border-bottom: 1px solid #06B6D4;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1.125rem;
  color: #94A3B8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Selección de áreas */
.area-selection {
  padding: 60px 0;
  background: linear-gradient(135deg, #0F172A 0%, #0F172A 100%);
  border: 1px solid #06B6D4;
  margin-top: -20px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 40px;
}

.area-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.area-tab {
  background: var(--bg-tarjetas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.area-tab:hover {
  border-color: var(--cian-primario);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.area-tab.active {
  background: var(--bg-tarjetas);
  border-color: var(--cian-primario);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
  color: var(--texto-principal);
}

.area-tab.active .tab-icon svg {
  color: var(--cian-primario);
}

.area-tab.active .tab-content h3,
.area-tab.active .tab-content p {
  color: var(--texto-principal);
}

.tab-icon svg {
  color: var(--cian-primario);
  transition: color 0.2s ease;
}

.tab-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--texto-principal);
  transition: color 0.2s ease;
}

.tab-content p {
  font-size: 0.875rem;
  color: var(--texto-secundario);
  margin: 0;
  transition: color 0.2s ease;
}

/* Contenido de automatizaciones */
.automations-area {
  padding: 60px 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  min-height: 50vh;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.automations-area[hidden] {
  display: none;
}

.automations-area.show {
  opacity: 1;
  transform: translateY(0);
}

.area-content {
  display: none;
}

.area-content.active {
  display: block;
  animation: areaContentIn 0.2s ease-out;
}

.area-header {
  text-align: center;
  margin-bottom: 48px;
}

.area-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.area-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-color);
  margin-bottom: 16px;
}

/* Lista de automatizaciones */
.automations-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.automation-item {
  background: var(--light-color);
  border: 1px solid #06B6D4;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.automation-item:hover {
  border-color: #06B6D4;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.08);
}

.automation-preview {
  flex: 1;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preview-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #F8FAFC;
  margin: 0;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background: #fee2e2;
  color: #ef4444;
}

.status-badge.pending {
  background: #fef3c7;
  color: #f59e0b;
}

.automation-description {
  color: var(--neutral-color);
  line-height: 1.5;
  margin: 0;
}

/* Acciones de automatización */
.automation-actions {
  flex-shrink: 0;
}

.btn {
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #06B6D4;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0891B2;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #06B6D4;
  border: 1px solid #06B6D4;
}

.btn-secondary:hover {
  background: #06B6D4;
  color: #ffffff;
}

/* Navegación activa */
.nav-link.active {
  color: var(--texto-principal);
  background: transparent;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .automation-header {
    padding: 100px 0 40px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .area-tabs {
    grid-template-columns: 1fr;
  }
  
  .area-tab {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .automation-item {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .preview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .automation-header {
    padding: 80px 0 32px;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
  
  .area-selection,
  .automations-area {
    padding: 40px 0;
  }
  
  .automation-item {
    padding: 20px;
  }
  
  .btn {
    width: 100%;
  }
}

/* Estados de focus para accesibilidad */
.area-tab:focus,
.btn:focus {
  outline: 2px solid #06B6D4;
  outline-offset: 2px;
}

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

