/* ==========================================================================
   ÁTOMOS: COMPONENTES INDIVISIBLES Y ELEMENTOS UI CORPORATIVOS
   Botones, Badges, LEDs de Estado, Métricas y Chips
   ========================================================================== */

/* 1. Indicador LED de Estado con Pulso Suave */
.atom-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.atom-led::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.4;
  animation: atomLedPulse 2s infinite ease-in-out;
}

.atom-led.status-ok { background-color: var(--status-ok); }
.atom-led.status-warning { background-color: var(--status-warning); }
.atom-led.status-alert { background-color: var(--status-alert); }

@keyframes atomLedPulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1); opacity: 0.5; }
}

/* 2. Badges y Pills Semánticos */
.atom-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--status-ok-bg);
  border: 1px solid var(--status-ok-border);
  color: var(--status-ok) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.atom-badge.neutral {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-secondary) !important;
}

.atom-badge.primary {
  background: var(--brand-glow);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--brand-accent) !important;
}

.atom-badge.warning {
  background: var(--status-warning-bg);
  border-color: var(--status-warning-border);
  color: var(--status-warning) !important;
}

.atom-badge.danger {
  background: var(--status-alert-bg);
  border-color: var(--status-alert-border);
  color: var(--status-alert) !important;
}

/* 3. Valor Numérico de Métrica */
.atom-metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.atom-metric-unit {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

/* 4. Botones Primarios de Acción (Enterprise Level) */
.atom-button {
  background: var(--brand-primary);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.atom-button:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--brand-glow);
}

.atom-button:active {
  transform: translateY(0);
}

/* 5. Botones Secundarios / Outline */
.atom-btn-secondary {
  background: var(--bg-card);
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.atom-btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--brand-primary);
  color: var(--brand-primary) !important;
  transform: translateY(-1px);
}

/* 6. Botón de Peligro / Destructivo */
.atom-button-danger {
  background: var(--status-alert-bg);
  color: var(--status-alert) !important;
  border: 1px solid var(--status-alert-border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.atom-button-danger:hover {
  background: var(--status-alert);
  color: #ffffff !important;
  border-color: var(--status-alert);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* 7. Botón Theme Toggle */
.atom-theme-toggle {
  background: var(--bg-card);
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.atom-theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-main) !important;
  border-color: rgba(148, 163, 184, 0.4);
}
