/* Tools Selector Component */
.tools-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botón principal de herramientas */
.tools-button {
  position: relative;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  color: #87CEEB; /* Azul pastel - mismo color que input-icon-button */
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.18s, text-shadow 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  /* Mismas propiedades que input-icon-button */
  outline: none;
}

.tools-button:hover {
  color: #87CEEB; /* Mantener azul pastel en hover */
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 8px rgba(135, 206, 235, 0.3);
}

/* Mantener el color púrpura y los efectos cuando el botón activo tiene hover */
.tools-button.active:hover {
  color: #b983ff; /* Púrpura pastel para estado activo - mismo que RAG */
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 16px #b983ff, 0 0 32px rgba(185, 131, 255, 0.8), 0 0 48px rgba(255, 255, 255, 0.1);
}

.tools-button.active {
  color: #b983ff; /* Púrpura pastel para estado activo - mismo que RAG */
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 16px #b983ff, 0 0 32px rgba(185, 131, 255, 0.8), 0 0 48px rgba(255, 255, 255, 0.1);
}

/* Indicador de carga en botón de herramientas */
.tools-button.loading,
.tools-button.initializing {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.tools-loading-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border: 2px solid #87CEEB; /* Azul pastel */
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.tools-button.initializing .tools-loading-indicator {
  border: 2px solid #FFB6C1; /* Rosa pastel para inicialización */
  border-top: 2px solid transparent;
}

/* Botón de configuración */
.tools-config-button {
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.4rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 12px;
}

.tools-config-button:hover {
  background: var(--surface-hover);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Fondo oscuro detrás del popup, clickeable para cerrar */
.tools-overlay-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 30, 0.75);
  z-index: 2000;
  animation: fadeIn 0.2s;
}

.tools-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Popup de herramientas */
.tools-popup {
  background: var(--surface-elevated, #23233a);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 8px 32px rgba(185,131,255,0.15);
  width: min(95vw, 1000px);
  height: min(90vh, 700px);
  display: flex;
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  animation: none !important;
  z-index: 2200;
  pointer-events: auto;
}

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

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Ajustes para header  --- */
.tools-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1.5rem;
}
.tools-header-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.tools-header-main h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.tools-header-subtitle {
  margin-top: 0.25rem;
  font-size: 0.98rem;
  color: #b983ff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  opacity: 0.95;
}
.tools-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
@media (max-width: 768px) {
  .tools-header-actions {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2300;
    background: rgba(35,35,58,0.98);
    box-shadow: 0 2px 8px #0002;
    padding: 0.5rem 0.7rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
  }
  .tools-header {
    padding-top: 3.2rem;
  }
}
@media (max-width: 768px) {
  .tools-header {
    padding: 1rem;
    gap: 1rem;
  }
  .tools-header-main h3 {
    font-size: 1.1rem;
  }
  .tools-header-subtitle {
    font-size: 0.92rem;
  }
}

/* --- Botones de cabecera --- */
.tools-header-actions button,
.refresh-button,
.close-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: rgba(185, 131, 255, 0.13);
  border: 2px solid #b983ff33;
  color: #b983ff;
  box-shadow: 0 2px 8px 0 #b983ff22, 0 1.5px 8px 0 #fff1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, border 0.18s, transform 0.13s;
  font-size: 1.1rem;
  outline: none;
  margin: 0;
  padding: 0;
}
.tools-header-actions button:hover,
.refresh-button:hover,
.close-button:hover {
  background: #b983ff;
  color: #fff;
  border: 2px solid #b983ff;
  box-shadow: 0 0 0 3px #b983ff44;
  transform: scale(1.08);
}
.tools-header-actions button:active,
.refresh-button:active,
.close-button:active {
  background: #a16ae8;
  color: #fff;
  border: 2px solid #a16ae8;
  box-shadow: 0 0 0 2px #a16ae844;
  transform: scale(0.97);
}
.tools-header-actions .refresh-button[disabled],
.tools-header-actions .close-button[disabled],
.refresh-button[disabled],
.close-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: #b983ff22;
  color: #b983ff99;
  border: 2px solid #b983ff22;
  box-shadow: none;
}

.tools-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem 1.5rem;
  min-height: 0;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--surface-secondary);
}

/* Scrollbar personalizado para webkit */
.tools-content::-webkit-scrollbar {
  width: 8px;
}

.tools-content::-webkit-scrollbar-track {
  background: var(--surface-secondary);
  border-radius: 4px;
}

.tools-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.tools-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary-hover);
}

.tools-content.modern-scroll {
  scrollbar-width: thin;
  scrollbar-color: #b983ff #23233a;
  background: transparent;
}
.tools-content.modern-scroll::-webkit-scrollbar {
  width: 10px;
}
.tools-content.modern-scroll::-webkit-scrollbar-thumb {
  background: #b983ffcc;
  border-radius: 8px;
}
.tools-content.modern-scroll::-webkit-scrollbar-track {
  background: #23233a;
  border-radius: 8px;
}

/* Error */
.tools-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-md);
  color: var(--error-text);
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Loading */
.tools-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Elimina el padding extra para que el layout no cambie respecto a tools-content */
  padding: 1rem 1.5rem 1.5rem;
  color: var(--text-secondary);
  height: 100%;
  box-sizing: border-box;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface-variant);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

/* Resumen */
.tools-summary {
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.tools-summary.modern-summary {
  background: rgba(185, 131, 255, 0.10);
  color: #b983ff;
  border: 1px solid #b983ff33;
  box-shadow: 0 1px 4px 0 #b983ff11;
}

/* Lista de herramientas */
.tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  grid-auto-flow: dense;
}

.tools-list.modern-list {
  gap: 2rem;
}

/* Categoría */
.tools-category {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-secondary);
  width: 100%;
  height: fit-content;
}

.tools-category.modern-category {
  background: rgba(185, 131, 255, 0.07);
  border: 1.5px solid #b983ff22;
  border-radius: 16px;
  box-shadow: 0 1px 8px 0 #b983ff11;
}

.category-title {
  background: var(--surface-variant);
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.category-title.modern-category-title {
  background: rgba(185, 131, 255, 0.13);
  color: #b983ff;
  border-bottom: 1.5px solid #b983ff22;
}

.category-tools {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-tools.modern-category-tools {
  gap: 0.7rem;
}

/* Item de herramienta */
.tool-item {
  margin-bottom: 0;
  width: 100%;
  break-inside: avoid;
}

.tool-item:last-child {
  margin-bottom: 0;
}

.tool-item.disabled {
  opacity: 0.5;
}

.tool-item.modern-tool-item {
  transition: box-shadow 0.18s, background 0.18s;
}
.tool-item.modern-tool-item:not(.disabled):hover {
  box-shadow: 0 0 0 2px #b983ff55;
  background: #b983ff11;
}

.tool-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.tool-checkbox:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}
.tool-checkbox.modern-tool-checkbox:hover {
  border: 1.5px solid #b983ff55;
  background: #b983ff11;
}

.tool-item.disabled .tool-checkbox {
  cursor: not-allowed;
}

/* Checkbox personalizado */
.tool-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkmark.modern-checkmark {
  border-radius: 6px;
  border: 2px solid #b983ff88;
  background: #23233a;
  transition: background 0.18s, border 0.18s;
}

.tool-checkbox input[type="checkbox"]:checked + .checkmark {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}
.tool-checkbox input[type="checkbox"]:checked + .checkmark.modern-checkmark {
  background: #b983ff;
  border-color: #b983ff;
  color: #fff;
}

/* Información de la herramienta */
.tool-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-info.modern-tool-info {
  gap: 0.18rem;
}

.tool-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.tool-name.modern-tool-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.tool-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.tool-description.modern-tool-description {
  color: #b983ff;
  font-size: 0.92rem;
}

.api-key-indicator, .unavailable-indicator {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 0.25rem;
}

.api-key-indicator {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.api-key-indicator.modern-api-key-indicator {
  background: #fffbe6;
  color: #b983ff;
  border: 1px solid #b983ff88;
}

.unavailable-indicator {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.unavailable-indicator.modern-unavailable-indicator {
  background: #ffeaea;
  color: #e74c3c;
  border: 1px solid #e74c3c88;
}

/* Estados de actualización de herramientas */
.tool-updating {
  opacity: 0.7;
  transition: all 0.3s ease;
}

.tool-update-success {
  animation: toolUpdateSuccess 0.8s ease;
}

.tool-update-error {
  animation: toolUpdateError 0.8s ease;
}

@keyframes toolUpdateSuccess {
  0%, 100% { background: transparent; }
  50% { background: var(--success-bg); }
}

@keyframes toolUpdateError {
  0%, 100% { background: transparent; }
  50% { background: var(--error-bg); }
}

/* --- ESTILO MEJORADO PARA MODAL DE HERRAMIENTAS --- */

/* Popup principal con layout de sidebar + contenido */
.tools-popup {
  background: var(--surface-elevated, #23233a);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 8px 32px rgba(185,131,255,0.15);
  width: min(95vw, 1000px);
  height: min(90vh, 700px);
  display: flex;
  overflow: hidden;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  animation: none !important;
  z-index: 2200;
  pointer-events: auto;
}

/* Sidebar de categorías */
.tools-sidebar {
  width: 240px;
  background: linear-gradient(135deg, #2F3A50 0%, #3A455B 60%, #4A3B6B 100%);
  border-right: 1.5px solid var(--border-light, #b983ff33);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.tools-sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border-subtle, #2a2a3e);
}

.tools-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools-sidebar-subtitle {
  font-size: 13px;
  color: var(--accent-primary, #b983ff);
  margin: 0;
  opacity: 0.9;
}

.category-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.category-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary, #b0b0c0);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  position: relative;
}

.category-nav-item:hover {
  background: var(--surface-hover, #3a3a52);
  color: var(--text-primary, #fff);
}

.category-nav-item.active {
  background: rgba(185, 131, 255, 0.15);
  color: var(--accent-primary, #b983ff);
  font-weight: 600;
}

.category-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-primary, #b983ff);
}

.category-count {
  margin-left: auto;
  background: var(--surface-variant, #32324a);
  color: var(--text-muted, #8a8a9a);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.category-nav-item.active .category-count {
  background: var(--accent-primary, #b983ff);
  color: white;
}

/* Contenido principal */
.tools-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(135deg, #23233a 0%, #3A455B 60%, #4A3B6B 100%);
}

.tools-main-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-subtle, #2a2a3e);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tools-main-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin: 0;
}

.tools-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(185, 131, 255, 0.1);
  border: 1px solid rgba(185, 131, 255, 0.3);
  color: var(--accent-primary, #b983ff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}
.action-button:hover {
  background: var(--accent-primary, #b983ff);
  color: white;
  transform: scale(1.05);
}

/* Grid de herramientas */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Tarjeta de herramienta */
.tool-card {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1)) !important;
  border: 2px solid var(--border-light, #333) !important;
  border-radius: var(--radius-lg, 16px);
  padding: 20px;
  transition: all 0.3s ease !important;
  cursor: pointer;
  position: relative;
}
.tool-card:hover {
  border-color: #87CEEB !important;
  background: rgba(135, 206, 235, 0.05) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3) !important;
}
.tool-card.selected {
  border-color: #b983ff !important;
  background: linear-gradient(135deg, rgba(185, 131, 255, 0.2), rgba(52, 152, 219, 0.2)) !important;
  box-shadow: 0 0 20px rgba(185, 131, 255, 0.4) !important;
}
.tool-card.selected:hover {
  border-color: #b983ff !important;
  box-shadow: 0 0 25px rgba(185, 131, 255, 0.5), 0 8px 25px rgba(0, 123, 255, 0.2) !important;
}
.tool-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Header de la tarjeta */
.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-checkbox-custom {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-top: 2px;
  font-size: 15px;
  color: #87CEEB;
}
.tool-card.selected .tool-checkbox-custom {
  color: var(--accent-primary, #b983ff);
}

/* Info de la herramienta */
.tool-info {
  flex: 1;
  min-width: 0;
}
.tool-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 4px 0;
  line-height: 1.3;
}
.tool-description {
  font-size: 13px;
  color: var(--text-secondary, #b0b0c0);
  line-height: 1.4;
  margin: 0 0 12px 0;
}
.tool-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.badge-api-key {
  background: rgba(173, 216, 230, 0.3) !important;
  color: #87CEEB !important;
  border: 1px solid rgba(173, 216, 230, 0.5) !important;
}
.badge-unavailable {
  background: rgba(255, 182, 193, 0.3) !important;
  color: #FFB6C1 !important;
  border: 1px solid rgba(255, 182, 193, 0.5) !important;
}

/* Estado vacío */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted, #8a8a9a);
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.4;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-secondary, #b0b0c0);
}
.empty-state-description {
  font-size: 14px;
  line-height: 1.5;
}

/* Overlay */
.tools-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .tools-popup {
    flex-direction: column;
  }
  .tools-main {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .tools-agents-section,
  .tools-tools-section {
    height: 50%;
    min-height: 40vh;
    overflow-y: auto;
    padding: 8px 0 0 0;
  }
  .tools-agents-section {
    border-bottom: 1.5px solid #b983ff33;
  }
  .tools-tools-section {
    border-top: none;
  }
}
@media (max-width: 1024px) {
  .tools-popup {
    width: 99vw;
    height: 98vh;
    min-width: unset;
    min-height: unset;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
  }
  .tools-sidebar {
    width: 100vw;
    max-width: 100vw;
    height: auto;
    min-height: 56px;
    border-right: none;
    border-bottom: 1.5px solid #b983ff33;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 4px;
  }
  .category-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    gap: 0.5rem;
  }
  .category-nav-item {
    white-space: nowrap;
    padding: 10px 18px;
    margin: 0 4px;
    border-radius: 12px;
    font-size: 15px;
    min-width: 90px;
  }
  .tools-main {
    padding: 0;
  }
  .tools-content {
    padding: 10px;
    font-size: 15px;
  }
  .tools-header {
    padding: 0.7rem;
    gap: 0.7rem;
  }
  .tools-header-main h3 {
    font-size: 1rem;
  }
  .tools-header-subtitle {
    font-size: 0.9rem;
  }
  .tools-header-actions button,
  .refresh-button,
  .close-button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.3rem;
  }
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Iconos */
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

/* Estilos específicos para agentes */
.agent-card {
  border: 2px solid var(--border-light, #333) !important;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1)) !important;
  transition: all 0.3s ease !important;
}

.agent-card:hover {
  border-color: #87CEEB !important;
  box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3) !important;
  transform: translateY(-2px) !important;
}

.agent-card.selected {
  border-color: #b983ff !important;
  background: linear-gradient(135deg, rgba(185, 131, 255, 0.2), rgba(52, 152, 219, 0.2)) !important;
  box-shadow: 0 0 20px rgba(185, 131, 255, 0.4) !important;
}

.agent-card.selected:hover {
  border-color: #b983ff !important;
  box-shadow: 0 0 25px rgba(185, 131, 255, 0.5), 0 8px 25px rgba(0, 123, 255, 0.2) !important;
}

.agent-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  color: #87CEEB;
}

.agent-card.selected .agent-icon-container {
  color: #b983ff;
}

.badge-agent-type {
  background: rgba(173, 216, 230, 0.3) !important;
  color: #87CEEB !important;
  border: 1px solid rgba(173, 216, 230, 0.5) !important;
}

.agent-card.selected .badge-agent-type {
  background: rgba(185, 131, 255, 0.3) !important;
  color: #b983ff !important;
  border: 1px solid rgba(185, 131, 255, 0.4) !important;
}
